Re:The Opa Framework for JavaScript
by endeavour on Tuesday June 18, 2013 @02:02PM
(#5900912)
It's a real shame they took out the nice terse OCaml syntax to make it look more similar to javascript.
[ Parent
| on HN ]
I'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?
There 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.
The OCaml syntax is still available:
opa --parser classic
Indeed, most of the stdlib is implemented using the "classic syntax".
Re:The Opa Framework for JavaScript
by UncleOxidant on Tuesday June 18, 2013 @05:30PM
(#5902210)
Is 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.