Jorge Tavares

"It is sometimes an appropriate response to reality to go insane." — Philip K. Dick

F# Impressions

with 6 comments

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.

About these ads

Written by Jorge Tavares

February 2, 2014 at 17:18

Posted in Programming

Tagged with , ,

6 Responses

Subscribe to comments with RSS.

  1. Could you please show the code which screams for LISP-like macros? I suspect there’s an elegant solution in F#.

    @kot_2010

    February 2, 2014 at 19:48

    • 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.

      Jorge Tavares

      February 3, 2014 at 19:13

  2. […] Jorge Tavares posted “F# Impressions“. […]

  3. 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》
    :-)

    José Martins

    February 3, 2014 at 23:28


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: