Chapter 1. Primer

WHAT'S IN THIS CHAPTER?

  • Understanding strategies

  • Reviewing Lambda calculus

  • Infering types

  • Understanding mutability

  • Creating your own bindings

Object-oriented programming has been with us for close to two decades, if not longer; its expressions of those concepts via the languages C# and Visual Basic, and the platform on which they run, the CLR, have been more recent, only since 2002. The community and ecosystem around the object-oriented paradigm is vast, and the various traps and pitfalls around an object-oriented way of thinking has seen copious discussion and experience, and where disagreements occur, reasoned and heated debate. From its inception more than 40 years ago, through its exploration in languages invented yesterday, an object-oriented approach to languages has received the benefit of the attention of some of the smartest language and tool designers in the industry, and a highly permutational approach to ancillary features around the language, such as garbage collection, strong-versus-weak typing, compilation-versus-interpretation, and various hybrids thereof, full-fidelity metadata, parameterized types, and more; no stone, it seems, remains unturned.

One of the principal goals of an object-oriented language is the establishment of user-defined types (UDTs) that not only serve to capture the abstractions around the users' domain, but also the capability to reuse those types in a variety of different scenarios within the same domain without modification. Sometimes ...

Get Professional F# 2.0 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.