Changes for page WebObjects with Scala
Last modified by Ravi Mendis on 2011/05/10 02:10
From version 448.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
To version 449.1
edited by Ravi Mendis
on 2010/12/23 06:56
on 2010/12/23 06:56
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,11 +1,14 @@ 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. Its [[functionallanguage>>http://en.wikipedia.org/wiki/Functional_programming]]foundationsandbuilt-in Actors library makes it especially attractive for concurrent computing. In this day and age of multi-core processors concurrent computing cannot 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. It is useful as complete general purpose replacement for Java. But its 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. 4 4 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: 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. 6 6 8 +Here's a quick summary: 9 + 7 7 |= |= Objective-C |= Java |= Scala 8 -|= Immu tability | Collections //e.g: NSArray/NSMutableArray// | No | Yes11 +|= Separation of Mutable & Immuable Datatypes | Collections //e.g: NSArray/NSMutableArray// | No | Yes 9 9 |= Closures | Blocks (//Extension//) | No | Anonymous Functions 10 10 |= Static variables | Yes | Yes | No 11 11 |= Static methods or functions | Yes | Yes | No ... ... @@ -28,13 +28,11 @@ 28 28 === Can WebObjects be Programmed In Scala? === 29 29 30 30 Yes. It is very simple. 31 -Scala compiles to java bytecode. 34 +Scala compiles to java bytecode. Hence using it with WebObjects is fairly straightforward. 32 32 33 -Furthermore, being a multi-paradigm language grants Scala easy WebObjects-interoperability. 34 - 35 35 ===== Caveats ===== 36 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 +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. 38 38 39 39 = WebObjects In Scala = 40 40