Fork me on Github

Fork me on GitHub

May 30, 2012

Heathrow route planning with Erlang, FSharp and CSharp

I have started a journey to learn more languages and comparing their benefits and drawbacks

An interesting problem that I recently came across is this one from learnyousomeerlang.com. The problem is to calculate the shortest distance to the end nodes in the grid. Here how I solved it using Erlang:



After having solved with Erlang, my second attempt was FSharp. I expected that these two could be very similar due to their shared functional paradigm, and indeed that came out fairly clearly.



I also decided to solve the problem with CSharp, which has a less explicit functional orientation. I kept the main approach from the Erlang and FSharp implementations, which may have contributed to the CSharp solution not being very idiomatically coded. Any suggestions on how you would have gone about the problem solving in CSharp differently are most welcome (please comment on the post)