Tag Archives: Don Syme

Benefits of functional programming

A couple of linked articles with a strong story on the benefits of choosing F# over C# for reducing the bug count and reducing the size of the codebase.

Simon Tyler Cousins compares two similar projects with F# clearly superior to C# in every category for those projects.

Don Syme opines that a key benefit of F# is that nulls are all but eliminated in the code and references the manifesto for Not Only O-O:

We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:

Functions and Types over classes
Purity over mutability
Composition over inheritance
Higher-order functions over method dispatch
Options over nulls

That is, while there is value in the items on the right (except for nulls), we value the items on the left more.

Leave a comment

Filed under Programming

Equality and Comparisons in F#

This blog post from Don Syme is really useful when considering options for customising equality and comparisons in F#. Having said that, with F# 2.0, it looks like you don’t need to put attributes on your type, it’s enough to follow Don’s overrides of GetHashCode, Equals and CompareTo.

Leave a comment

Filed under Programming