4 ms·
TBH, compiled general languages are doomed to be complicated, because they need more info during compile-time. The only exception is C (if you don't count stuff
by esjeon 5y ago
TBH, compiled general languages are doomed to be complicated, because they need more info during compile-time. The only exception is C (if you don't count stuffs like Lisp). IIRC, C grammar can be easily printed on a single sheet of letter paper.
- nynx 5y agoUnfortunately, the behavior of C’s grammar is incredibly complicated.
- xvedejas 5y agoI'm not convinced this is true. A simple grammar can express a whole lot of information. I think complex grammar is desirable in some cases because a lot of ways we choose to make grammar more complex are ergonomic. Binary infix operators, various kinds of brackets and braces, ... it all is a bit more difficult to describe as a grammar, sometimes more difficult to learn, but also closer to natural ad-hoc ways that technical people would write things down to communicate them. Just see the typical ways of writing mathematics as an extreme example.
- eatonphil 5y agoAny language can be compiled whether it's dynamically, weakly typed or not. Look at Chicken Scheme as an example or my projects compiling Javascript or Python. https://github.com/eatonphil/pyc https://github.com/eatonphil/pyc https://github.com/eatonphil/jsc https://github.com/eatonphil/jsc
- lmm 5y agoC is absurdly complicated (just try to understand all the different arithmetic promotion rules that can apply to an expression like "a + b"), you just don't notice it because it doesn't use that complexity for anything except occasionally giving you undefined behaviour.