Changes for page WebObjects with Scala
Last modified by Ravi Mendis on 2011/05/10 02:10
From version 453.1
edited by Ravi Mendis
on 2010/12/23 06:51
on 2010/12/23 06:51
Change comment:
There is no comment for this version
To version 452.1
edited by Ravi Mendis
on 2010/12/23 07:08
on 2010/12/23 07:08
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,14 +1,11 @@ 1 1 === What is Scala? === 2 2 3 -[[Scala>>http://en.wikipedia.org/wiki/Scala_(programming_language)]] is a JVM language that is a hybrid of Object-Oriented and Functional styles. It isuseful ascompletegeneralurposereplacementfor Java. Butts built-in Actors library makes it especially attractive for concurrent computing. In this day and age of multi-core processors,concurrent computing can't be ignored.3 +[[Scala>>http://en.wikipedia.org/wiki/Scala_(programming_language)]] is a JVM language that is a hybrid of Object-Oriented and Functional styles. Its [[functional language>>http://en.wikipedia.org/wiki/Functional_programming]] foundations and built-in Actors library makes it especially attractive for concurrent computing. In this day and age of multi-core processors concurrent computing can not be ignored. 4 4 5 -Many of Scala's features have been designed with concurrency in mind, primarily a preference for immutability and the use of other functional language paradigms. 6 -Some of these may not be unfamiliar to Objective-C or WebObjects developers. 5 +Many of Scala's features have been designed with concurrency in mind, some of which may not be unfamiliar to Objective-C or WebObjects developers. Here's a summary: 7 7 8 -Here's a quick summary: 9 - 10 10 |= |= Objective-C |= Java |= Scala 11 -|= Separation of Mutable &Immuable Datatypes| Collections //e.g: NSArray/NSMutableArray// | No | Yes8 +|= Immutability | Collections //e.g: NSArray/NSMutableArray// | No | Yes 12 12 |= Closures | Blocks (//Extension//) | No | Anonymous Functions 13 13 |= Static variables | Yes | Yes | No 14 14 |= Static methods or functions | Yes | Yes | No ... ... @@ -33,8 +33,10 @@ 33 33 Yes. It is very simple. 34 34 Scala compiles to java bytecode. Hence using it with WebObjects is fairly straightforward. 35 35 36 - However,tool support isaweak point. You should use Eclipse 3.6 with bundle-less WO builds. If your Application class is in Scala then you will haveto create an Eclipselaunch configuration manually. One weird thing is that once you add the Scala nature to a WO project WOD completion will stop working - this is unfortunate. Also the [[Scala plugin>>http://www.scala-ide.org]] is rather slow and still very buggy.33 +===== Caveats ===== 37 37 35 +Tool support is a weak point. You should use Eclipse 3.6 with bundle-less WO builds. If your Application class is in Scala then you will have to create an Eclipse launch configuration manually. One weird thing is that once you add the Scala nature to a WO project WOD completion will stop working - this is unfortunate. Also the [[Scala plugin>>http://www.scala-ide.org]] is rather slow and still very buggy. 36 + 38 38 = WebObjects In Scala = 39 39 40 40 The following highlights some of the differences between Java and Scala in WebObjects: