Lesson 5. Trusting the compiler

The compiler is one of the most important features in any language. In a language such as F#, where the compiler does a lot of heavy lifting for you, it’s particularly important that you understand the role it plays in your day-to-day development cycle. In this lesson

  • You’ll look at the F# compiler from a developer’s point of view (don’t get scared!).
  • You’ll focus specifically on one area of it: type inference.
  • You’ll recap what type inference is from a C# / VB .NET perspective.
  • You’ll look at how F# takes type inference to the next level.

5.1. Type inference as we know it

Unless you’ve used only earlier versions of C#, you’ll almost certainly be familiar with the var keyword. Let’s refamiliarize ourselves with ...

Get Get Programming with F# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.