View Single Post
  #22 (permalink)  
Old 05-18-2008, 06:02 PM
G_Morgan G_Morgan is offline
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 523
Last Blog:
Just over the next hil...
Credits: 0
Rep Power: 10
G_Morgan is a jewel in the roughG_Morgan is a jewel in the roughG_Morgan is a jewel in the rough
Default Re: Anyone know where I can begin to teach myself programming?

Basically it's a runtime library and a compiler. It compiles directly to Java bytecode and you can actually just bundle the runtime library into a jar file and then it's indistinguishable from a general Java app.

You can do all the normal Functional language stuff. Anonomous functions, first class functions, higher order functions, so on and so forth. It also has mixins from Ruby (though Scala calls them traits). It optimises tail calls IIRC by using exceptions to trampoline it. Hopefully Java 7 will see proper tail calls implemented, that will fix a lot of functional languages on the JVM. The real brilliance is the type inference system is very good and allows you to leave a program nearly typeless and it will infer most types avoiding the need to use reflection.

You can call any Java code from Scala. Going the other way is more difficult but can be done if you extend interfaces.
Reply With Quote