by sifoobar · 8y ago · 0 comments
I would add better integration with the C tool chain, more separation of concerns and less academic ego bullshit.
I've been working on something like that [0] lately.
Syntax for the sake of syntax is pointless, imo. Obviously there's a balance here - APL and Applescript both suffer from either extreme.
ifStmt := "if" "(" expression ")" statement ( "else" statement )?
unlessStmt := "{" exprStmt exprStmt* "}" "unless" expression ";"
I doubt this additional syntax would be a positive for the language's user. And the divergence will almost certainly make implementation changes more difficult. If we had instead: ifStmt := "if" "(" expression ")" statement ( "else" statement )?
| "unless" "(" expression ")" statement
This smaller amount of syntax is easily understood, increases expressibility, and `unless` will most likely be implemented as simple sugar, just a negation of the expression in an `if`.There's definitely some sweet spot in the middle, taking scan-ability and symmetry both into account.
You can get away with just providing a 'while' loop (or maybe just goto and labels).
Most languages end up with a for and maybe a repeat-until syntax for the sake of natural looking constructs.
There is a reason people choose boring imperative languages for large projects.
I did an internship at an 'Big 4' company which (from folklore) had a moderately large server written in Haskell, the codebase was a nightmare and eventually they ended up rewriting it in C++, which I believe they still use.
And that's fine, they can keep writing their big projects using dumbed down languages and fresh out of school code monkeys. But there is plenty of code written that doesn't fit into that description.
Sounds like the opposite of what the post is advocating.
Programming languages will always be compromises, you always trade something in to get what you want. Anyone telling you otherwise is trying to sell you a new religion.