F# is a functional first language that runs on .NET, which means it can use the same libraries and tools as C#. Its pitch is simple: write less code, let the compiler infer more, and make incorrect states harder to express. For developers who like .NET but want a more concise style, it is a natural second language to learn.

The first thing you notice is type inference. You rarely write type annotations for local values, because the compiler works them out from how values are used. A function that adds two numbers does not need its types spelled out, and if you later pass it something that cannot be added, the compiler will say so before the program runs.

Pipelines are the second habit worth learning. The |> operator passes the value on its left as the final argument of the function on its right, so a chain of steps reads top to bottom in the order they happen.

let add x y = x + y let result = 3 |> add 2 printfn "%d" result 

Here add takes two numbers and returns their sum. The pipeline passes 3 as the final argument, so add 2 receives 3 as its second argument, and result is 5, which printfn prints. Read it as: take 3, add 2, print the result. Small functions composed this way stay easy to test, because each one does one thing and has no hidden state.

F# also leans on immutability by default. Values are not changed in place unless you explicitly ask for a mutable variable. That removes a whole class of bugs where a value changes unexpectedly between two uses, and it makes concurrent code safer, since shared data is not being rewritten under you.

None of this means F# is only for mathematics or research. It is used for web services, data processing, and tooling, and it interoperates with C# libraries directly, so adopting it does not mean abandoning the .NET ecosystem.

The honest trade

F# gives you conciseness and strong compile time checking, at the cost of a smaller community and fewer learning resources than C#. Finding answers, libraries, and jobs takes a little more effort, and teams used to object oriented C# may need time to adjust to a functional style. The language itself is not harder, but the ecosystem around it is smaller. That trade is worth it when correctness and clarity matter more than the size of the hiring pool, and less appealing for a team that needs to hire quickly in C# specifically.

Start with one small project

The best way into F# is a small, real project: a command line tool, a data script, or a tiny web API. Write it with pipelines and immutable values, let the compiler guide you, and notice how much code you did not need. That experience tells you more about the language than any feature list can.

Originally published at https://practicaldevblog.blogspot.com/2026/11/f-explained-functional-code-on-net.html