4 ms·
It's a real shame they took out the nice terse OCaml syntax to make it look more similar to javascript.
by endeavour 13y ago
It's a real shame they took out the nice terse OCaml syntax to make it look more similar to javascript.
- jeffbr13 13y agoI'm looking forward to writing modern (i.e. web) programs with features stolen from functional languages! And, at the end of the day, more people are more familiar with Java-like syntax, and that's good for adoption. But can anyone tell me whether the change from ML-like -> Java-like syntax has meant a loss of composability/expressability/any other traditional strengths of FP languages?
- hbbio 13y agoThere is no loss at all: There are just two parsers for the same Abstract Syntax Tree. After parsing which is the very first step of the compiler, everything is the same. All the features of Opa lie in the ability to analyze the code and generate JS code from the AST.
- hbbio 13y agoThe OCaml syntax is still available: opa --parser classic Indeed, most of the stdlib is implemented using the "classic syntax".
- UncleOxidant 13y agoIs this still available? I don't think that's a valid option in the later versions (at least for the last year). There's been some discussion of this on the Opa forums, and it seems that the OCaml-like syntax is gone now. It's a pity, really. Edit: ah, you're right. It apparently still exists, but the original ML-like syntax is undocumented now.
- deleted 13y ago[deleted]