Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
canadaduane
on Aug 9, 2021
|
parent
|
context
|
favorite
| on:
Zig Pathtracer
I'm new to Zig but I think this is how you would do it:
{ var i: usize = 0; while (i < 10) : (i += 1) { // use i } }
tored
on Aug 9, 2021
[–]
Looks like a solution, a bit annoying to introduce an extra block.
abainbridge
on Aug 9, 2021
|
parent
[–]
Yeah. And it fails the "make the easy way the right way" test of language design.
dnautics
on Aug 9, 2021
|
root
|
parent
[–]
I give a c-like for loop (or while loop) a 40% odds of making it into the language. That number being pulled out of my nether regions.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: