« Return to Thread: Scala vs Fan
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, andFunccan be parameterized using a special syntax. For example a list ofIntsin Fan is declared asInt[]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.
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
« Return to Thread: Scala vs Fan
| Free embeddable forum powered by Nabble | Forum Help |