Hacker News new | past | comments | ask | show | jobs | submit login

Things to consider:

The company is >20 years old.

OCaml is a general purpose language that provides an equilibrium between the avoidance of bugs introduced by state (like all functional languages), speed, and polymorphic type inference. At the time of adoption, the other choices were Haskell (too academic, not practical), Erlang (no type inference, not suited for large code bases with complex business logic), and lisp (too slow, loose/optional type system). The last time I checked, OCaml was third only to C and C++ in terms of speed. It is also important to consider how intellectually stimulating it is to write OCaml. If you can achieve the three things mentioned at the top of this paragraph while also creating a brand of gravitas and intellect that attracts top-tier talent, of course you would choose OCaml.

Would a new, uninitiated market maker write something in OCaml? Unlikely, as they would probably use C++, Rust, or Scala with a 1TB heap and GC disabled. Ignoring the learning curve and time/dollar constraints of starting a hedge fund, I would choose OCaml over the three mentioned.

[1]https://en.m.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_...

[2]https://courses.cs.washington.edu/courses/cse341/04wi/lectur...






Yaron Minsky (speaker in the talk, and guy who introduced OCaml to Jane Street) wrote in detail about how the firm decided on this in ACM Queue: https://queue.acm.org/detail.cfm?id=2038036

At the time of OCaml choice at JS (I guess it was circa 2008-2010; I also strongly suspect that it was not at the start of JS) Haskell already had multithreaded RTS with very green threads, software transactional memory and multicore support.

[1] https://downloads.haskell.org/~ghc/6.6.1/docs/html/libraries... (Control.Concurrent contains forkIO - thus, green threads!)

Guessing from what information is available to me, it was a matter of personal preferences, not technical decision.

PS From [2] in some other comment, it really was a matter of personal choice.

[2] https://queue.acm.org/detail.cfm?id=2038036

At [3] it can be found that ghc had green threads at 2002.

[3] https://downloads.haskell.org/~ghc/5.04/docs/html/base/index...


> At the time of OCaml choice at JS (I guess it was circa 2008-2010; I also strongly suspect that it was not at the start of JS)

You're right that it wasn't OCaml from the beginning, but I believe it was quite a bit earlier than that. The firm dates to 1999-2000, and OCaml came into the picture sometime around 2004.

The reason they avoided Haskell, supposedly, is the lack of predictability in its performance, largely due to its laziness. OCaml, meanwhile, has a fairly straightforward compilation that allows moderately experienced developers to have a very good idea of what the corresponding machine code will be.


Why C++ now but not then, 20+ years ago? And would F# be suitable for the task? Im genuinely interested

Presumably Jane Street didn’t choose C++ because they wanted to reduce bugs introduced by the preservation of state; the killer of prop shops. F# was developed six years after their founding, hence too young, and more importantly, a Microsoft-owned clone of OCaml. I don’t think it even ran on Linux before 2015. Today, F# might just suit the job, assuming you are open to being locked into the .NET family. An interesting idea to say the least.

Why C++ now? Still the fastest and tons of quants and highly skilled programmers know it. When you consider the correlation between C++ developers’ technical acumen and quantitative skills, coupled with the maturity and increasing convenience of the ecosystem, it makes sense.


> assuming you are open to being locked into the .NET family

Which is not different than being locked into e.g. JVM family, or even being locked into OCaml itself.


.NET (redone as Core) was a much worse choice 20 years ago than it is now of course. If they would fully open up the debugger, I would prefer it over the JVM. OCaml is more open (for .NET Core, there is still no good open debugger and the JVM suffers from Oracle keeping closed performance enhancements which, in my experience, do make big difference) than either of them, but not many people like programming it so it is hard to find people.

Everything in the C++ ecosystem is better now than it was 20 years go. The language, the tools, the libraries, the build systems. It's actually fairly pleasant to work in these days.

Not really, everything related to app development is just gone, dead, with Qt and wxWidgets being the remaining survivors.

VCL is only available to corporate shops and those that aren't into FOSS religion.

MFC is in maintenance mode, and so far Windows developers are more keen moving into one of .NET UI stacks while keeping some C++ code as COM/DLLs or even C++/CLI, than jumping into UWP/WinUI. It remains to be seen if WinUI 3.0 will change the migration trend.

Then on mobile OSes, it isn't even an option, unless you want to write your own GUI from scracth using OpenGL/Metal/Vulkan.


I doubt HFT firms are writing apps in C++.

Everything in almost every ecosystem is better than it was 20 yrs ago. Even Common lisp is evolving... even c++ is almost, aaaaalmost has a package manager :-)

G-Research in London are using F# I believe

I think you are ascribing too much thought to Jane Street's decision to use OCaml. I think it was a good choice, on balance, but from what I heard/read when I worked there it was mostly just circumstantial.

There are many prop shops using plain old java with zero gc code.



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

Search: