Perspective on F#

I’ve been using F# for roughly a semester now. It has been very beneficial to my project.

As part of my research, I am implementing a plug-in to AutoCAD, Micado. A Windows-only application, AutoCAD can be extended in C++, .NET, and AutoLISP — all in various degrees; in particular, certain core extensions can only be implemented in C++. Given these constraints, I chose to write the bulk of my application on the .NET platform. Initially, I implemented a prototype in C#. When it was time to start fresh, I decided to spice things up by learning F# and using it whenever possible.

The benefits of switching to F# entirely exceeded my expectations. I feel my code is written at a higher-level of abstraction. Coding in F# feels like building little languages that allow me to express my problem closer to its domain, thus solving a class of problem instead of just the one specific problem I am facing (whose requirements keep changing anyways — that’s research, after all!)

This resonates with a recent post of Don Syme to the F# mailing list:

[…] F# clearly excels at being a “domain” language. […] So I’d encourage us all to look at F# in that light: a general-purpose programming tool that can be applied very effectively to “crack open” domains like those above and apply the essential power of both FP and OO programming to problem solving in those domains, as well as being just a great FP/OO language. Applying F# to solve problems is what it’s all about, and that’s where much of the fun lies.

I’ll see if I can give specific examples in Micado. To be continued…

For now, let me conclude by saying that F# is tons of fun. And the fun elevates the research.

Leave a Reply