Sum of squares example

My first dive into F# development

I had my first dive into F# development

I followed the first code example on the https://fsharpforfunandprofit.com site which was a “sum of squares” comparison between C# and F#. I have never needed to evaluate the sum of squares before, but I can see how this is a useful comparison as it is a very basic example of a problem that any developer could solve using C# but translates it to F# to show how much better it is.

The explanation

I found the explanation to be very useful, and the comparison they write between the two. The main takeaways for me were;

  1. No type declarations
  2. Interactive development

The interactive development part was very interesting as it mentions that you can test your code as soon as you’ve written it by running it in the interactive F# window. As I have been doing with my examples here. The main points made were that this iterative development where you develop a little and then run it to make sure it’s good is something that isn’t straight forward in C#. The second takeaway was that if the code is hard to develop iteratively and interactively then it will be hard to test too and there should be a better approach.

Written on August 28, 2018