The best way to get started learning and building with F#
Date: 2024-01-14 | create | tech | fsharp |
I love F#. Over the past few years it's become my favorite language and a core part of my tech stack.
But it took a lot of time and effort to understand why it was good and how to use it effectively. In this post I want to share a few resources that I found useful in my F# journey to hopefully make yours a little easier.
Why F#
The first and biggest hurdle is always "Why should I use F#?". This is the same for any programming language / technology - there are so many options, each with their own tradeoffs. And as always there is no single best option for everyone - it all depends on your situation.
So the best way to answer this is really to give you a little crash course in what F# is, what its tradeoffs are, and why that might be useful and allow you to compare that with your own usecase / values to see if it's a good fit.
My recommendation for this is the "Why use F#?" series by Scott Wlaschin. It may look a little long but it is absolutely, totally worth it. This will give you everything you need to know about F# and links to a lot of supplementary material if you want to dive deeper (F# for fun and profit is an absolute treasure trove of info on F# / functional paradigms).
Start there, read it through, and if you're still interested check out some of these other resources.
If you're into Domain Driven Design, I would highly recommend Scott's book Domain Modeling Made Functional. This is the single best book I've ever read on the topic, showing how simple and powerful domain modeling can (and should) be when done correctly.
F# Fundamentals
Okay so you're interested in playing around with F# but it probably looks weird. It's a new language afterall so you'll need to learn some new syntax but it's also got some design choices that are different from most languages on the market (this is a feature, not a bug!).
Here are a few resources you can use for reference to better understand some F# fundamentals if you get stuck / curious:
Official Microsoft F# docs: You can knock Microsoft for a lot of things but they've got incredible documentation. Microsoft is the main builder / supporter of F# and they have a huge library of well-crafted and maintained documentation to support it. This is a great place for learning more about the standard library and common usage patterns. Here's an example documentation page for F# Lists.
Official F# docs: Similarly F# has reference documentation for each function in its standard library. These are great for understanding available functions and usages but have less on broader usage patterns. Example documentation page for F# Lists.
If you're looking for references those are the places to go but often you want to get a better idea of how people actually use these things in practice. For this I have a few recs:
Video Tutorials:
- Fast F# makes a lot of videos on writing very fast systems with F# but also has a large collection of videos exploring F# fundamentals.
- Amplify FSharp is a recurring lecture series inviting experts from around the community to dive into various F# topics.
Books:
- Essential F# is supposed to be a good book to get you up to speed. I've never read this personally but it gets good reviews and the author is very helpful and knowledgeable in the F# community so I'm sure it's great.
- F# in Action provides a crash course into practical areas for writing real programs.
Building software with F#
Alright so you now want to use F# and you know the fundamentals (or at least how to unblock yourself) and want to build real software with F#. Great - get going!
But that might feel a little overwhelming so maybe you want some inspiration from other people building in F# to help you get started. For this, we've got a few options.
- F# Community - There's a pretty active community on Twitter (#fsharp), Reddit (r/fsharp), and a few Discord channels supported by the F# Software Foundation.
- F# Weekly - Sergey Tihon runs F# weekly which compiles highlights for the ecosystem from news to releases to community discussions. This is a great way to get a feel for what's going on.
Finally I build lots of projects, mostly with F# these days, and share updates on what I'm building, how I built them, and my learnings along the way. This has led to a pretty large backlog of F# posts, mostly focused on building fullstack server-side-rendered webapps with F#.
You can get updates from me on Twitter, through my email list, or via any of my socials listed on my home page.
Next
Of course the very best way to learn how to build is to build things yourself! So go build and let us know what you're building.
If you want to get a head start with a production-ready, fullstack F# app - check out CloudSeed - the F# project boilerplate I use to start all my projects.
If you liked this post you might also like:
Want more like this?
The best / easiest way to support my work is by subscribing for future updates and sharing with your network.