4 ms·
I've written a moderate amount of OCaml and some Go. While I agree that the former is a nice language, it doesn't compare favorably to Go as a development suit
by acc00 14y ago
I've written a moderate amount of OCaml and some Go.
While I agree that the former is a nice language, it doesn't compare favorably to Go as a development suite: the standard library is terribly designed, and the package management is rather poor compared to Go's (which is about as great as it gets).
Now there is "OCaml Batteries Included" which is supposed to mitigate that, but it appeared after I stopped actively using OCaml so I can't comment on that (incidentally, I dislike many of their choices).
Also Go has many of the features that make programming in ML a pleasure, many languages these days have them, which is a good thing.
Personally my tool of choice for many tasks would be OCaml with Go's package management system, and perhaps a syntax closer to M-expressions (like Mathematica).
- grey-area 14y agoI love the package management in go and agree it is pretty good, but the lack of versions make me nervous. I do wish they reacted quicker to common criticisms like this and the missing generics, but I guess they want to take their time and do things right. What there is of go has been a pleasure to explore though. Would you mind expanding on what is good about m expressions and how that could apply to go, I'm not familiar with them?
- acc00 14y agoSee [0] for an introduction to M-expressions, which was initially an alternative syntax for Lisp, but have found its way into APL and Mathematica. Please note I'm suggesting using that syntax for OCaml, not Go. In short, I want to write "f[x;y]" for "f x y". On the first sight it appears this adds a bunch of noise, but there are many advantages: 1. You now have much less parens resulting from nested function calls; 2. You get partial application by any argument, not just the last. map[;list] is a "functor" that applies its argument to "list"; 3. Corollary to this, chaining functions together is now much easier even if you need to supply a parameter other than the last: f[;x]$g[y] (assuming $ stands for apply; it might be wortwhile to take empty space for application) 4. Further you are able to unify many aspects of the syntax (if[cond;true;false]), which makes parsing easier for both humans and computers. [0] http://en.wikipedia.org/wiki/M-expression http://en.wikipedia.org/wiki/M-expression
- gnuvince 14y agoOCaml should definitely move toward adopting either Batteries or Jane Street Core as its standard library; they offer a lot more functionality. For package management, I haven't had the chance to really try it yet, but I'm hearing good things about OPAM. Finally, Rust just looks awesome, I'm hoping that the language stabilizes before the end of the year, as I'd love to do my master thesis with it.
- acc00 14y agoAs great as OPAM might be (neither have I tried it), it has one fundamental downside compared to Go: it is a package manager for OCaml. Package management is one of those things that are better off when there is just one.
- gnuvince 14y agoI'm pretty sure OPAM will become the de facto standard of the OCaml world; most people don't want to deal with the other ones.