You’ve never heard of F#? I don’t blame you. Maybe you do recall something, but believe that it’s ancient history and probably obsolete. Well, you’re in for a surprise because F# could be the next best enterprise language having utmost potential for AI, ML and Data Science. For those of you who don’t know, it is a strongly-typed multi-paradigm language that was developed by Microsoft almost 14 years ago. It is eligible for functional, imperative and object-oriented programming; it can be used for both domain-driven and data-driven development.

F# does not appear on any lists that mention the top programming languages of the world, i.e JavaScript, Python, Ruby, Java, PHP, etc. It’s actually nowhere near the top 25 if you check. It was initially designed for the .NET platform by Don Syme from Microsoft Research team. Although similar to FP languages like Lisp and Scala, it is relatively free of the associated complications. If you’re wondering why it remains so obscure, the truth is that the developers themselves have inhibited its popularity.

The ‘F’ in F# is designated to symbolize ‘fun’, and the creators have always treated this language as an accessory to C#. It’s more or less described as a prototype to play with, in order to build the base for coding in C#. It’s crystal clear that Microsoft has perpetually prioritized C# and there’s no denying that it indeed is a solid language. The thing is that F# can do all the things C# is capable of, and the catch is that it can do everything better. Developers who have trusted and used C# for years, were amazed after switching to F# for a bit and didn’t wish to go back.

F# slightly deviates from the .Net culture and is truly platform independent; you cannot label it as a web development language or put it under another category. Compared to C#, its code is more compact, it doesn’t have any type declarations, and can be developed interactively. If you’re starting to call this bluff, let me enlighten you that F# is ironically the highest paid language in the world. Some argue that the reason behind this is the scarcity of programmers who know how to code in the language. This might be a valid claim, but that doesn’t change the facts.

What’s so great about F#?

I’ve already mentioned how F# is better than C# and other functional programming languages. Then there’s the high income and multi-dimensional approach it offers. However, there’s more when you get into details and verily explore the shadows. You would be astonished to learn that this language has a strong & stable community, so it will not fall short on support. Yes, most of the big corporate names are not using it, yet it has been applied by many successful companies on a global level. It’s not just good for mathematical/algebraic stuff, but literally anything – real time apps, service oriented web back-end, mobile games or whatever (just name it!).

Among all the good things about F#, the best has to be that it makes clean coding easier. Objects in the language are immutable by default and cannot be null. The rich type system allows programmers to write the true state of a function, thereby providing flexibility. An invalid state is impossible, and this leads to relatively bug-free application development. A lot more can be done with lesser code, especially because there’s little room for making mistakes. Try and replicate your F# project with C#, and you’ll see that it won’t be as straightforward.

The simplicity of F# is exceedingly favorable for software designing and domain modelling. The asynchronous nature of the language accelerates the process of prototyping, and allows smooth transition to production. Having a .NET core, it is open source and can be applied on a variety of ecosystems. F# has access to an abundant collection of mature/high quality libraries and the tooling is equally magnificent. World class cross-platform IDEs like Rider and Visual studio also support the language on all leading operating systems.

F# features a range of excellent web frameworks, such as Giraffe, Saturn, Freya, and Suave. On the topic of front-end development, this language can be compiled into JavaScript with Babel; and that brings us to ‘Fabel’. Fabel optimizes F# code to produce super-clean JS, and comes with a light-weight core library (no runtime required). Both Fabel and Babel are open source, backed by a thriving community of developers. Therefore, it is safe to say that F# has tremendous potential in web development (front-end & back-end).

Will Learning F# be Rewarding?

Programmers who are constantly seeking exclusive skills to add to their resume, must give F# a chance. Once you start using it, chances are high that you might fall in love. There’s no use lying, so I’ll go ahead and say that currently it is low in demand. The only reasonable excuse is lack of exposure or awareness. There’s a strong possibility that it will become more widespread in the future, alongside advancements in Artificial Intelligence and Machine Learning. There’s no downside to learning F#, considering its diversity and potential.


Leave a Reply

Your email address will not be published. Required fields are marked *