Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I've gone to ocaml and never looked back to do java


sort by: page size:

Amen. I started to code a bit in OCaml and it's great.

I would have loved to use Ocaml for my compilers course, writing one in Java was a less than ideal situation, especially since the spec we were implementing was a strict subset of Java. Not much of a wow factor when you create a language that can't do anything the implementation language couldn't.

As a counter-anecdote, I came to OCaml skeptically in late 2018, having previously done significant work in Haskell, Clojure[Script], and Java. I got up and running very quickly, and IMO compared to those other three languages/platforms, OCaml tooling is only worse/more difficult than Java's.

OCaml was a required course in school for me. It was immensely useful and allowed me to think differently about programming (I only knew Java,C,C++ at the time).

My college CS education began with OCaml, I kid you not.

> Ocaml is a nice replacement for ANSI C, not for Java.

That's pretty much how I use it. Ocaml is a great systems language.


I quite enjoyed programming in OCaml.

I entirely agree, OCaml is a particularly fun one for me. I suppose my word choice should have been better, but "dynamic language" was a fairly lazy and easy choice to contrast against big, bad Java.

I tried to use OCaml once. My main difficulty was the compiler error messages were very primitive, and I had an awful time figuring out what was wrong with the code I was writing.

I finally just gave up.


It lacks ecosystem though. If OCaml worked on an existing big platform like JVM that would be a killer feature for me.

I didn't use OCaml for that long, but I still remember being astonished at how trivial it was to refactor in it.

What's the big deal with OCaml ?

I found it to be a very nice, powerful, and enjoyable language.


Except no one's ever heard of OCaml.

OCaml seems to be on an upswing in popularity/hype recently. As someone who's threading the waters in Clojure but not a fan of the JVM developer experience I'm curious why OCaml is a great choice.

I would love to hear some stories from people using it in production. I'm leaning towards wanting to use a LISP as it's just so elegant... but I feel that getting boggled down in "hard core" functional programming is a bit daunting and limiting.


I'm writing OCaml just one hour ago. Out of all the languages I know (and I'm very or reasonably proficient in many), it's still the easiest one.

I am also interested in OCaml, so thanks for sharing this. I’ve heard it’s higher level than Rust and has GC. I’ve spent most of my career using Java and after a few weeks of Rust I love many things about it but feel managing lifecycles and ownership might be too much for me.

Give it a few more years and every language will be OCaml :)

Ocaml is a (mostly) good to great language with horrible tooling that completely kills any desire I have to work with it.

I don't see why this is a bad thing. Ocaml is really nice.
next

Legal | privacy