Changes for page WebObjects with Scala
Last modified by Ravi Mendis on 2011/05/10 02:10
From version 335.1
edited by Ravi Mendis
on 2010/03/04 22:54
on 2010/03/04 22:54
Change comment:
There is no comment for this version
To version 336.1
edited by Ravi Mendis
on 2010/03/19 00:05
on 2010/03/19 00:05
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -8,19 +8,19 @@ 8 8 9 9 Here's a quick summary: 10 10 11 -|= |= Objective-C |= Java |= Scala 12 -|= Mutable /Immuable Datatypes | Collections //e.g: NSArray/NSMutableArray// | No | Yes13 -|= Closures | Blocks (//Extension//) | No | Anonymous Functions 14 -|= Static variables | Yes | Yes | No 15 -|= Static methods or functions| Yes | Yes | No 16 -|= Concurrency | [[Grand Central Dispatch>>http://en.wikipedia.org/wiki/Grand_Central_Dispatch]] (//Extension//)| //Threads// |[[Actors>>http://en.wikipedia.org/wiki/Actor_model]] 17 -|= |= Weakly Typed |=--Strongly Typed--|= Strongly Typed 11 +|= |= Objective-C |= Java |= Scala 12 +|= Separation of Mutable & Immuable Datatypes | Collections //e.g: NSArray/NSMutableArray// | No | Yes 13 +|= Closures | Blocks (//Extension//) | No | Anonymous Functions 14 +|= Static variables | Yes | Yes | No 15 +|= Static methods or functions | Yes | Yes | No 16 +|= Concurrency | [[Grand Central Dispatch>>http://en.wikipedia.org/wiki/Grand_Central_Dispatch]] (//Extension//)| //Threads// |[[Actors>>http://en.wikipedia.org/wiki/Actor_model]] 17 +|= |= Weakly Typed |=--Strongly Typed--|= Strongly Typed 18 18 19 19 Other notable features include: 20 20 21 -|= |= Objective-C 22 -|= Parametered methods | Yes //e.g: addObject: to~:// |No| Yes //e.g: add(object= ,to=)//23 -|= Class composition | Categories 21 +|= |= Objective-C |= Java |= Scala 22 +|= Parametered methods | Yes //e.g: addObject: to~:// | No | Yes //e.g: add(object= ,to=)// 23 +|= Class composition | Categories | Interfaces | Traits 24 24 25 25 === Why Use Scala? === 26 26 ... ... @@ -186,11 +186,11 @@ 186 186 187 187 {{code}} 188 188 189 -def movies: NSArray[ EOGenericRecord] = {190 - storedValueForKey(_Studio.Keys.MOVIES).asInstanceOf[NSArray[ EOGenericRecord]]189 +def movies: NSArray[Studio] = { 190 + storedValueForKey(_Studio.Keys.MOVIES).asInstanceOf[NSArray[Studio]] 191 191 } 192 192 193 -def moviesList: List[ EOGenericRecord] = {193 +def moviesList: List[Studio] = { 194 194 movies.objects.toList 195 195 } 196 196 ... ... @@ -200,7 +200,7 @@ 200 200 201 201 {{include value="WOL:Adding Scala Support to a WOLips Project"}}{{/include}} 202 202 203 -{{note title="Note"}}203 +{{note}} 204 204 205 205 This is for Eclipse/WOLips IDE 206 206 ... ... @@ -237,3 +237,11 @@ 237 237 1. Set ##scala.home## (the location Scala has been installed onto) in the project ##build.properties## file 238 238 1. [[Add the scalac task and properties>>Configuring Ant to Build Scala with WebObjects]] to the ant build.xml file 239 239 1. Run from the project directory: ##sudo ant clean install## 240 + 241 +== Caveats == 242 + 243 +{{warning}} 244 + 245 +Currently mixed Scala and Java projects aren't supported by the Scala Eclipse IDE, though it is possible to do so providing your project is either mostly Java or mostly Scala. 246 + 247 +{{/warning}}