Changes for page WebObjects with Scala
Last modified by Ravi Mendis on 2011/05/10 02:10
From version 442.1
edited by Ravi Mendis
on 2010/12/23 06:48
on 2010/12/23 06:48
Change comment:
There is no comment for this version
To version 447.1
edited by Ravi Mendis
on 2010/12/23 23:48
on 2010/12/23 23:48
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,15 +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 is useful as complete general purpose replacement for Java. But its built-in Actors library makes it especially attractive for concurrent computing. 4 -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. 5 5 6 -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. 7 -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: 8 8 9 -Here's a quick summary: 10 - 11 11 |= |= Objective-C |= Java |= Scala 12 -|= Separation of Mutable &Immuable Datatypes| Collections //e.g: NSArray/NSMutableArray// | No | Yes8 +|= Immutability | Collections //e.g: NSArray/NSMutableArray// | No | Yes 13 13 |= Closures | Blocks (//Extension//) | No | Anonymous Functions 14 14 |= Static variables | Yes | Yes | No 15 15 |= Static methods or functions | Yes | Yes | No ... ... @@ -32,10 +32,14 @@ 32 32 === Can WebObjects be Programmed In Scala? === 33 33 34 34 Yes. It is very simple. 35 -Scala compiles to java bytecode. Hence using it with WebObjects is fairly straightforward.31 +Scala compiles to java bytecode. 36 36 37 - However, tool supportis a weak point. You should useEclipse 3.6 withbundle-less WO builds. Ifyour Applicationclass is in Scalathen you will have to create an Eclipselaunch configuration manually. Oneweird thingis that once you addtheScalanaturetoa WOprojectWOD completion willstop working-this is unfortunate. Alsothe [[Scalaplugin>>http://www.scala-ide.org]] is rather slow and still verybuggy.33 +Furthermore, being a multi-paradigm language grants Scala easy WebObjects-interoperability. 38 38 35 +===== Caveats ===== 36 + 37 +Tool support is a weak point. If your Application class is in Scala then you will have to create an Eclipse launch configuration manually. Also the [[Scala plugin>>http://www.scala-ide.org]] is rather slow and still very buggy. 38 + 39 39 = WebObjects In Scala = 40 40 41 41 The following highlights some of the differences between Java and Scala in WebObjects: