Industrial FP

This post points to a paper about Jane St. Capital‘s use of functional programming for financial trading applications. In the paper, they explain that the important reasons for using OCaml versus familiar OO languages are better readability, performance and macros. Their use of macros is just to get a generic data printer. On performance, OCaml is fast, but the compiler doesn’t do a great job with some higher-order features, nor is there support for concurrency. On readability, they drop the “O” and just use Caml. They explicitly show all types so code reviewers don’t have to look types up to see what they are. This is also their complaint about inheritance in OO, that they have to look up all parents to figure out what an object really does. That strikes me as a problem with the editor, not with the language. Anyway, higher-order functions are just as mysterious as inheritance, but Caml programmers don’t seem to use it as much. IMHO, the primary reason to use an FPL is for the powerful type checker, which can catch more errors at compile-time compared to conventional languages with simpler type systems.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s