Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> That's my definition of "true explicitness", where all code which executes at some point is available locally.

But no control flow construct satisfies that. Jumps are the whole point, and the unit for structured control flow is the block (what's the next instruction after `break`, `continue` or `}`?). defer is just as structured, just as local, and just as explicit as C's control flow constructs.

> It's also familiar syntax to the entire generations of programmers.

True, but learning Zig takes a day; two tops. Where it differs in syntax from C, it does so for good reason, and it's not like it's a complex language where different syntax is an additional burden. C's `for` syntax just doesn't make sense (`;`, which everywhere else in the language denotes sequential composition, means something different in the `for` header). Is an additional 2 minutes of learning, in a language that has very little syntax, not worth fixing something that's unpleasant in C?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: