←back to thread

517 points bkolobara | 2 comments | | HN request time: 0s | source
Show context
veber-alex ◴[] No.45042068[source]
I find the Zig example to be shocking.

It's just so brittle. How can anyone think this is a good idea?

replies(5): >>45042182 #>>45042784 #>>45043157 #>>45045393 #>>45046983 #
tialaramex ◴[] No.45042784[source]
I assume it's a bug. However because this is an auteur language if you want the bug fixed it will be important to ensure the auteur also thinks it is a bug. If they get it into their head that it's supposed to be like this, they'll double down and regardless of how many people are annoyed they're insist on it.
replies(5): >>45043413 #>>45043564 #>>45044228 #>>45048414 #>>45054675 #
jibal ◴[] No.45044228[source]
Why would you assume that? It's very intentional design decision.
replies(1): >>45050386 #
1. tialaramex ◴[] No.45050386{3}[source]
Because it's a foot gun. People are going to shoot themselves in the foot with this feature, and I'm generous enough to assume that was not desired which makes it a bug.
replies(1): >>45050559 #
2. jibal ◴[] No.45050559[source]
As others have noted, this is not idiomatic usage. But again, this is the design ... there's no bug. Languages are full of design decisions that may not be optimal in all usages ... that's different from bugs. Footguns breed bugs.

Here's a page of non-bugs: https://www.reddit.com/r/ProgrammingLanguages/comments/1hd7l...