Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Perhaps OT: I've tried to like OCaml 2 or 3 times so far and have not succeeded. I've loved Haskell (until I hit the wall), enjoy Python, enjoyed Ruby, am very happy with JS, had a love/hate relationship with C/C++ (really, header files?!), loved Java compared to C/C++ (until I learned to hate Java). And I'm generally really excited by what's going on in languages right now.

I just wish there was an SML for the JVM. But until then Ocaml is probably the gear and I look forward to reading this book.

And, oh my golly, have you seen OCaml's Eliom for Ocsigen? Absurdly interesting. http://ocsigen.org/eliom/ One language for the browser and server, with client/server transparency and best-in-class server performance.



My only experience with OCaml is two hours that I spent coding in it for an interview problem. So, from a complete beginner's perspective:

i) It needs better libraries, or perhaps better library documentation. A full hour of my time was spent working out how to read lines from a file.

ii) It is a beautiful language. The code I wrote, as someone completely new to the language and not using any libraries, was much shorter than the equivalent code I would have written in Python, a language which I know much better, and an order of magnitude shorter than what I would have written in Java or C. It makes functional abstraction easy in the same way that Haskell does, but the ability to mix in imperative code if it gets the job done in fewer lines (or in a less mind-bending way) is supremely useful.


For i), it's in progress: see OCaml Batteries Included http://batteries.forge.ocamlcore.org/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: