Last December I decided to start to learn properly F#. Before that I only had done the usual explore and play to have an idea of the language. Anyway, I started to read Programming F# 3.0 by Chris Smith complemented by Expert F# 3.0 by Don Syme, Adam Granicz and Antonio Cisternino. Two excellent books without a doubt.
However, nothing beats actual practice and after I felt a bit comfortable with F#, I started my usual “Hello World” project: an Evolutionary Algorithm library/framework. Personally, this is my ideal beginner project since I can only focus in the learning the language and the task has a good deal of complexity that allows to explore the programming language in many ways. Until now I have completed three iterations, starting with a simple Genetic Algorithm using only the more basic constructs and focusing more in the functional approach, to something more generic and library-like exploring the multi-paradigm functionality of F#.
The impressions so far have been very positive. It mixes very well the functional and object-oriented approaches and the support to switch to parallel programing is very good (for example, you can just change Array.map to Array.Parallel.map). The thing I miss most so far it’s macros like in Common Lisp. I’ve already faced two/three situations which were “screaming” for a macro but I assume this is also a sign that I still need to program more in F#. I haven’t used F# so much in a script way like many people do but that’s something that I need to explore more. I feel it’s a nice language and should be worth knowing it better, especially if you need to work with .NET.
Could you please show the code which screams for LISP-like macros? I suspect there’s an elegant solution in F#.
Hi, thanks for the comment. Yes, I’m sure there is an elegant solution in F# and I would like to learn it :) I will upload the code to github shortly and then share it.
The code is here: https://github.com/jorgetavares/Genome. My main issue is with the duplication of code in Ga.fs when trying to make it easier to define/configure different types of algorithms.
[…] Jorge Tavares posted “F# Impressions“. […]
I’m sorry. You must be some kind of a bot. Nobody writes the following sentence.
《I started my usual “Hello World” project: an Evolutionary Algorithm library》
:-)
LOL! :)