PDC – Day 1

I’m writing this from the ‘big room’ in the LA Convention Center.If you don’t know, PDC is a HUGE conference Microsoft holds to introduce cutting edge technology and show developers the roadmap for Microsoft’s platforms. What that means for me, is that I’ve been talking about F# non-stop to anybody who will listen. Random Notes:…

0

Due out Next Year – Programming F# by Chris Smith

I’d like to announce that for the past few months I’ve been secretly working on a book for O’Reilly titled Programming F#. My aim is to provide the one-stop-shop for learning the breadth of the F# language. A special thanks goes out to Nate LaMartina, a friend of mine at Mythic Entertainment for putting together…

14

F# Zen – The Literal Attribute

  When pattern matching it is easy to forget that you are capturing a new value instead of matching against an existing one. Take this function for example:let E = 2.718281828459 let PI = 3.141592653589 // Ooops – this captures a value let isConstant x = match x with | PI | E -> true…

5

F# Zen – Colored printf

It’s easy to lose track of important data when logging output to the console window, fortunately you can use the System.Console.ConsoleColor property to set the output color. But unlike F#’s printfn, System.Console.WriteLine doesn’t use type inference and feels much different than the printf and printfn methods you’re used to. Here’s how to create a version…

1