Tuesday, August 4, 2015

Decompile F# into C#

Let’s continue our journey in F# land that we started last week. On the fsharpforfunandprofit.com I found a great blog post where language concepts were implemented in F#, decompiled to IL and compiled again to C#. This gives you a great insight(if you are a C# developer) in how the F# language works behind the scenes and all the work the compiler is doing for you.

When you look at the results, the biggest differences can be found when looking at F# specific features like Record types and Pattern Matching. Generally, the F# code is much shorter than the equivalent C# code.

It’s almost painful to see how much code you need to write in C#… Verwarde emoticon

No comments: