« Return to Thread: Scala vs Fan

Re: Scala vs Fan

by Meredith Gregory :: Rate this Message:

Reply to Author | View in Thread

Rob,

Here is a quote from the Fan website indicating their position on generics.

Generics

Interestingly enough while Fan is trying to make programs less strongly typed, the Java and C# languages are moving to be more strongly typed. Generic types illustrate this trend - a feature added to both Java and C# in the not so distant past. Our philosophy is that generics are a pretty complicated solution to a fairly insignificant problem.

Fan takes a limited approach to generics. There is no support for user defined generics. However, three built-in classes List, Map, and Func can be parameterized using a special syntax. For example a list of Ints in Fan is declared as Int[] using the familiar array type syntax of Java and C#. This trade-off seems to hit the sweet spot where generics make sense without complicating the overall type system.


i think they haven't look at Haskell. Genericity enables two-level type solutions. These are elegant, compositional and (can be made) efficient. i've demonstrated repeatedly that features like reflection come for free from two-level type-based solutions. So, i'm not likely to be a fan of the Fan design sensibility.

Best wishes,

--greg

On Tue, Jul 8, 2008 at 7:11 AM, Rob Dickens <arctic.bob@...> wrote:
Dear list,

I read a blog entry[1] this morning, about an interesting-sounding[2] new language. Like Scala, it has static typing with type inference, first-class functions, operators as methods, mix-ins and 'Erlang-style concurrency'. Unlike Scala, it 'compiles into fcode - a bytecode representation that can be translated into both Java bytecode and IL easily. This translation is typically done at runtime, which enables you to deploy Fan modules as a single file and have them run on either VM.'

Of particular interest (I thought) is the following combination of features:

* top-level name-space modules (pods) correspond to actual deployment modules (zip files)

* support for declaring instances of classes in serialised form using a subset of the language (rather than XML)

* built-in build engine (rather than using Ant or Maven).

So I was just wondering what anyone thought about this.

Cheers,

Rob

1 http://www.ajaxonomy.com/2008/java/not-a-fan-of-scala-an-evolutionary-approach

2 http://www.fandev.org/doc/docIntro/WhyFan.html





--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com

 « Return to Thread: Scala vs Fan