News for hackers. Stuff that matters.
Re:Ballerina Programing Language by noelwelsh on Monday February 24, 2020 @04:39AM (#22402769)
I like the idea but I'm not impressed by the language. Syntactically there is a lot of noise (e.g. semicolons, function types are incredibly verbose). It seems to be missing generic types, pattern matching doesn't seem to express structural recursion, if is not an expression, etc. etc.
Re:Ballerina Programing Language by jclark_th on Monday February 24, 2020 @05:17AM (#22402915)
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.
Re:Ballerina Programing Language by dragonwriter on Monday February 24, 2020 @11:10AM (#22405300)
But 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.)
Re:Ballerina Programing Language by jclark_th on Wednesday February 26, 2020 @07:10AM (#22422254)
I 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).

Re:Ballerina Programing Language by noelwelsh on Monday February 24, 2020 @05:55AM (#22403052)
I don't really buy that argument. Even Java has simple lambdas now, for example.
Re:Ballerina Programing Language by jclark_th on Monday February 24, 2020 @09:51AM (#22404399)
Ballerina has simple lambdas e.g. x => x + 1.