

Fan vs Scala: Different Trade-offs - blasdel
http://www.fandev.org/sidewalk/topic/675#c4548

======
jongraehl
It seems the author doesn't know much about Scala. There seem to be quite a
bit of "Fan vs. Scala" posting from Fan fans with this characteristic.

No overloading: since Fan doesn't have Hindley-Milner type inference, it seems
like a loss to drop overloading. Presumably they did this to make the language
implemenation simpler.

Wildcard type: "Any" in Scala is an available supertype to everything,
including primitives. It sounds like Fan has some unsafe automatic type
conversion going on that you'd have to make explicit in Scala.

Immutability: in Scala, "val" is immutable, "var" is mutable. This is SUPER
basic stuff; I'm not sure how you miss that.

As for libraries, build system, JSON: Scala actually has all that (but it
looks like Fan has some additional JSON config integration built in)

You can pass Scala objects to Java libs (callbacks, observers, etc.) and it
just works. There's almost no difference between using Java and Scala, which
is a pretty strong point.

------
carterschonwald
it doesn't seem to be a very good comparison, and rather more like "I think
Scala does something that is probably clever which i'm not familiar with, but
I like how Fan does XYZ with this example"

------
donw
The syntax looks to make a lot more sense than Scala; any ideas what the
performance numbers are like?

I'll need to play around with this.

~~~
bsf
Fan executes pretty close to the same speed as Java.

Here is a presentation illustrating some benchmarks of Fan versus other JVM
languages:

[http://www.slideshare.net/michael.galpin/performance-
compari...](http://www.slideshare.net/michael.galpin/performance-comparisons-
of-dynamic-languages-on-the-java-virtual-machine?type=powerpoint)

