For anyone who wants to try out the language, here's an OCaml tutorial with an in-browser interpreter: http://try.ocamlpro.com/
Hmm, only 2 lessons and nothing more than I figured out before I even started them. Hopefully they'll expand in the future.
OCaml for the Masses
21–29 of 29 posts
Re: OCaml for the Masses
#22Earlier quoted context omitted.
The compiler for haXe ( http://www.haxe.org/ ) is written in OCaml. That's actually how I ran across OCaml to begin with.
Wow, I had no idea haxe was still around. I looked at using it about 4-5 years ago and dismissed it as not ready for prime time, but that looks like a reasonably active community.
Re: OCaml for the Masses
#23Earlier quoted context omitted.
The compiler for haXe ( http://www.haxe.org/ ) is written in OCaml. That's actually how I ran across OCaml to begin with.
Wow, I had no idea haxe was still around. I looked at using it about 4-5 years ago and dismissed it as not ready for prime time, but that looks like a reasonably active community.
Re: OCaml for the Masses
#24Seems like financial/quant computing would be a natural fit. The author mentions ocaml being well suited for general programming needs - Anyone using ocaml (or haskell/f#/etc.) for real production code? Edit: should have mentioned this earlier for an example - xmonad is written in haskell
Several investment banks are using these languages in production (BarCap (F#) and Standard Chartered (Haskell) are the names that come immediately to mind). And of course Minsky's employer, Jane Street Capital, writes everything in OCaml. There are plenty of commercial users outside the financial sector too but those users tend to be smaller companies.
Re: OCaml for the Masses
#25To someone who has only just looked at Haskell (and not gotten very far) the syntax looks very similar. Can anyone speak to the differences between the two languages?
OCaml is strict and impure, Haskell lazy and pure. Syntactically they're pretty different, but since they both make heavy use of the H-M type system you see pretty similar semantic operations across the board. Probably the first thing that sets them apart is that IO is a lot more direct in OCaml, a direct implication of strictness and impurity. Extensions to the type system are really different, OCaml's is more flexi…
Did you want to say that they are pretty similar? Or semantically different?
Re: OCaml for the Masses
#26To someone who has only just looked at Haskell (and not gotten very far) the syntax looks very similar. Can anyone speak to the differences between the two languages?
The type systems is one major difference. OCaml as the name suggests supports objects. Haskell's type system is more expressive. I believe OCaml's type inference system is fully decidable Haskell's isn't. The evaluation models are different Haskell is lazy default, Ocaml is eager default. Ocaml doesn't support multiple native threads(green threads only.) Ocaml isn't pure.
That depends on the extensions you are using.
The biggest difference between the typesystems in practice seems to be the ubiquitous use of type classes in Haskell. OCaml's modules can do the same as type classes, but they require annotations and aren't used as pervasively.
Re: OCaml for the Masses
#27Seems like financial/quant computing would be a natural fit. The author mentions ocaml being well suited for general programming needs - Anyone using ocaml (or haskell/f#/etc.) for real production code? Edit: should have mentioned this earlier for an example - xmonad is written in haskell
Re: OCaml for the Masses
#28Earlier quoted context omitted.
Several investment banks are using these languages in production (BarCap (F#) and Standard Chartered (Haskell) are the names that come immediately to mind). And of course Minsky's employer, Jane Street Capital, writes everything in OCaml. There are plenty of commercial users outside the financial sector too but those users tend to be smaller companies.
Whenever I see OCaml brought up, it is nearly always by Minsky. Is it that very few people use it in general? That it is particularly well suited to the problems a private hedge fund faces (oxymoron I know, but I don't know how else to describe Jane Street)? Or that Minsky just happens to be vocal in the internet circles I tend to gravitate toward?
You are right, OCaml doesn't see too much use outside of Jane Street, Citrix and a few others. I think the academics mostly left it in favour of Haskell. Also the owner of the OCaml project didn't embrace community development early on. It's more like a cathedral than a bazaar. They are signs showing to change, but it's probably already too late for mainstream popularity.
Re: OCaml for the Masses
#29Earlier quoted context omitted.
OCaml is strict and impure, Haskell lazy and pure. Syntactically they're pretty different, but since they both make heavy use of the H-M type system you see pretty similar semantic operations across the board. Probably the first thing that sets them apart is that IO is a lot more direct in OCaml, a direct implication of strictness and impurity. Extensions to the type system are really different, OCaml's is more flexi…
> Syntactically they're pretty different, Did you want to say that they are pretty similar? Or semantically different?