CoffeeScript for TypeScript
Way back in the early 2010s I was very "excited" about coffee script and similar projects. They sounded like they should be great for productivity.When I actually tried to write a project in coffee script, the results were the opposite of what I expected.The code was harder to read, harder to modify, harder to understand, harder to reason about.There's something about removing stuff from syntax that makes programming harder. My hypothesis is this: your brain has to spend extra effort to "decompress" the terse syntax in order to understand it, and this makes reading code unnecessarily difficult.So I fundamentally disagree with the underlying premise of these projects, which seems to be based on PG's concept of "terse is power".My experience suggests the opposite: there's power in being explicit. Type declaration is an example of such a feature: it makes explicit something about the code that was implicit.Type declarations add more to the parse tree, and require you to type more, but they actually give you more power.The same can be said about being explicit in the language constructs.There of course has to be a balance. If everything is way too explicit (more so than needed) then your brain will do the opposite of what it needs to do with terse code: it has to spend more effort to remove the extra fluff to get to the essence of what the code is doing.Being terse is good, up to a point. Same with being explicit.Languages that try to bias too strongly towards one extreme or the other tend to miss the mark. Instead of aiming for balance, they start to aim for fulfilling some higher telos.