Re:MoonScript - A programmer friendly language that compiles...
by chc on Thursday August 11, 2011 @03:13PM
(#2874303)
On rereading, I realized this might give a false impression. OCaml does allow the user to define an operator, but a confluence of the type system (which doesn't allow overloading and makes abstracting types sufficiently difficult that it doesn't justify the minor syntactic nicety of a custom operators) and precedence rules means that most OCaml code you'll see does not use a lot of weird operators like you'll find in advanced Haskell code. I'm not an OCaml guru, but that's what I've seen.
[ Parent
| on HN ]
Re:MoonScript - A programmer friendly language that compiles...
by ppog on Friday August 12, 2011 @12:33AM
(#2875985)
Not OCaml per se, but at least one F# library makes liberal and very effective use of custom operators: FParsec, Stephan Tolksdorf's parser combinator library (http://www.quanttec.com/fparsec/reference/primitives.html). Of course, FParsec is adapted from the Haskell Parsec library, so maybe that just makes your point for you!