Monday, 9 October 2017

A simple Concestor dictionary

The F# Journal just published an article:
"This article describes the natural extension of our Concestor data structure to purely functional dictionaries, equivalent to the built-in F# `Map`. As for sets, we demonstrate substantial performance gains both in microbenchmarks as well as a simple dictionary data compressor..."
If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!

Sunday, 8 October 2017

What are the advantages of F# over C#

I just stumbled upon this old Stack Overflow post of mine which has been deleted:

The main advantage of F# over C# is much lower development costs (once your developers are familiar with F#, which will probably only take a few weeks).

From my personal experience I would estimate the productivity boost (= drop in development cost) to be 2-10×. This is strongly dependent upon the application, of course. The best cases for F# are applications requiring dense algorithmics (i.e. hard problems) or DSL implementations. The worse cases for F# are primarily where other languages have better tooling, e.g. GUI designer, WSDL code generator.

I consulted for a London-based company in the finance sector for 15 months and, amongst other things:


  • Implemented in F# in 4 hours a feature that had been scheduled to take 3 months of development in C++.
  • Built in F# in 3 months a server with 100x higher throughput, 100x lower latency and 10x better scalability (number of simultaneous client connections) than their legacy C++.
  • They were training around a dozen F# developers when I left.


I am currently consulting for one of the world's largest insurance companies and my predecessor developed an entire pension quote calculator (typically scheduled to take 300-400 man days) entirely in F# in under 100 days with no prior F# experience at all. Performance is 10× better than the C++ that it replaces because the new code avoids unnecessary copying and exploits multicore parallelism. Part of my job here will be to give basic F# training to around 20 people and bring a few people up to expert level.

The Concestor Set

The F# Journal just published an article:
"A set is an abstract data structure that stores its elements without duplicates and permits efficient insertion, removal and search. The most popular concrete implementation of a set is the hash table but this is an inherently mutable collection. Purely functional sets, including the `Set` collection provided by F#, are based upon balanced trees. This article looks at the design and implementation of a new purely functional set that has very different performance characteristics and, in particular, is much faster in some circumstances..."
If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!

Tuesday, 3 October 2017

Creating a new term-rewrite language

The F# Journal just published an article:
"This article walks through the design and implementation of a simple but remarkably powerful new programming language that uses term rewriting as an evaluation model and, consequently, is well suited to computer algebra..."
If you subscribe to the F# Journal then can read this article here otherwise subscribe to the The F# Journal today to read this article and many more!