#1729 About pattern matching on funtional programming and myself

daitangio Mon 12 Dec 2011

Hi all,

my name is Giovanni Giorgi, I am a 37-years old senior software architect.

In my daily job I work with Java (I know it from 1995, the HotJava era :) Anyway I was always avid about new programming languages.

I learned SmallTalk, Perl, Php when still at university. In the last year I learned Erlang and tried a bit of Scala. I liked Erlang, but it lacks strong typing and deep modularization.

On Scala side, it has too much strong typing, and too many way of doing things. Scala is like the Perl of Java.

I have started looking at Fantom because I wanted to play a bit on functional programming side, and my dear python language was too dynamic to do the trick. I like Fantom because the compiler can catch a lot of errors at compile time, and I am still free to do some dynamic tricks via the -> operator. Best I can instruct Fantom on what is immutable and what is not, and this is very important in my humble opinion.

Does Fantom provide a pattern-matching syntax like the one found in Erlang or Scala? Is it possible to simulate patern-matching in some way?

About programming languages... http://gioorgi.com/series/lang/

brian Mon 12 Dec 2011

Hi Giovanni,

Welcome to Fantom!

Best I can instruct Fantom on what is immutable and what is not, and this is very important in my humble opinion.

Yes we agree and think this is a hugely important (and seem to be one of the few new languages baking it in)

Does Fantom provide a pattern-matching syntax like the one found in Erlang or Scala? Is it possible to simulate patern-matching in some way?

Fantom has a more powerful switch/case mechanism than Java (you can use any type). But there is is currently no pattern matching syntax like that found in Scala - sorry.

Login or Signup to reply.