Hacker News new | past | comments | ask | show | jobs | submit login
Fan vs Scala: Different Trade-offs (fandev.org)
7 points by blasdel on July 22, 2009 | hide | past | favorite | 4 comments



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.


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"


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.


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...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: