Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

First impressions of the Fantom programming language? [closed]

Has anyone here given the Fantom programming language a whirl? (pun intended).

My first impression:

  • I like the ability to have the code run on either the .NET or Java VM.
  • The syntax is nice and clean and does not try anything fancy.
  • I have a belief that "the library is the language" and the developers of Fan believe that their USP is their APIs:

But getting a language to run on both Java and .NET is the easy part - in fact there are many solutions to this problem. The hard part is getting portable APIs. Fan provides a set of APIs which abstract away the Java and .NET APIs. We actually consider this one of Fan's primary benefits, because it gives us a chance to develop a suite of system APIs that are elegant and easy to use compared to the Java and .NET counter parts.

Any other thoughts, first impressions, pros and cons?

like image 737
Swaroop C H Avatar asked Sep 25 '08 14:09

Swaroop C H


3 Answers

It looks very inspired by Ruby. It says that it's RESTful but I don't see how exactly. Compare with boo, which is more mature yet similar in many ways (its syntax is Python inspired, though).

The design decisions to keep generics and namespaces very limited are questionable.

like image 108
Mark Cidade Avatar answered Oct 27 '22 16:10

Mark Cidade


I think their explanation sums it up:

"The primary reason we created Fan is to write software that can seamlessly run on both the Java VM and the .NET CLR. The reality is that many software organizations are committed to one or the other of these platforms."

It doesn't look better than all other non-JVM/.NET languages. In the absence of any information about them (their blog is just an error page), I see no reason why they would necessarily get this righter than others. Every language starts out fairly elegant for the set of things it was designed for (though I see some awkwardness in the little Fan code I looked at just now) -- the real question is how well it scales to completely new things, and we simply don't know that yet.

But if your organization has a rule that "everything must run on our VM", then it may be an acceptable compromise for you.

You're giving up an awful lot just for VM independence. For example, yours is the first Fan question here on SO -- a couple orders of magnitude fewer than Lisp.

For what problem is Fan the best solution? Python and Ruby can already run on both VMs (or neither), have big communities and big libraries, and seem to be about the same level of abstraction, but are far more mature.

like image 2
Ken Avatar answered Oct 27 '22 17:10

Ken


I have never heard of Fan until a couple of weeks ago. From the web site, it is about one year old so still pretty young and unproven. There are a couple of interesting points however: First the language is tackling the problem of concurrency by providing an actor model (similar to erlang) and by supporting immutable objects. Second, the object follows the example of Scala with type inference. Type inference allows the programmer to omit type declarations but have it computed by the compiler providing the advantage of short and cleaner code as in a dynamically type language while preserving the efficiency of a statically type language. And last, it seems like a very fast language, nearly as fast as Java and really close or beating the second fastest language on the JM: scala. Benchmark showing the performance can be found at http://www.slideshare.net/michael.galpin/performance-comparisons-of-dynamic-languages-on-the-java-virtual-machine?type=powerpoint.

like image 1
Robert Monnet Avatar answered Oct 27 '22 17:10

Robert Monnet