4 ms·
The language has a lot of syntactic compromises, because it has a design goal of being familiar to users of C-family languages like C, JavaScript, Java, C#, etc
by jclark_th 7y ago
The language has a lot of syntactic compromises, because it has a design goal of being familiar to users of C-family languages like C, JavaScript, Java, C#, etc.
- noelwelsh 7y agoI don't really buy that argument. Even Java has simple lambdas now, for example.
- jclark_th 7y agoBallerina has simple lambdas e.g. x => x + 1.
- dragonwriter 7y agoBut several of the listed problems don't exist in many of the listed languages or close relatives (I wouldn't really call JavaScript C-family either, as, except maybe C-style for-loops, it has nothing that distinguishes C from other Algol-syntax languages, and other than Algol-style syntax it's more a blend of ideas from Lisp and Self than anything related to C), so those flaws cannot be necessary for familiarity to users of those languages (Java, C#, and several of JS’s statically-typed derivatives that are designed to be familiar to JS programmers, like TypeScript, have generics, so “missing generics” doesn't make sense as a familiarity compromise for users of those languages.)
- jclark_th 7y agoI didn't say that all the listed problems were caused by the goal of being familiar. It doesn't yet have generics because they are hard to get right and the language is still at an early stage. Many languages that subsequently added generics did not have them in the earliest versions of the language (C++, Java, C#, TypeScript, Go).