5 ms·
If you haven't heard of it before, look up the "most vexing parse" for the kind of thing languages are trying to avoid with this syntactic approach. That specif
by stormbrew 4y ago
If you haven't heard of it before, look up the "most vexing parse" for the kind of thing languages are trying to avoid with this syntactic approach. That specific one is a c++ thing, but C also has its own versions of it (that c++ inherits).
Basically the C grammar is only context free if you cheat in the lexer, and any language trying to improve on C is likely to try to avoid that (or just give up and go wild).
- lelanthran 4y agoI interpreted the GP to mean: "Why use `fn` instead of `function`?" After all, he did say: > If we need readability than function() instead of fn() would do better.
- stormbrew 4y agoRight, I'm saying that it's not about human readability, it's about parser (and I suppose grep) readability. So the goal is to make the parse easier with as little effort on the part of the programmer as possible. The whole word function would take up an unnecessarily large part of a line for that purpose.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]