Changes for page WebObjects with Scala
Last modified by Ravi Mendis on 2011/05/10 02:10
From version 496.1
edited by Ravi Mendis
on 2010/12/24 03:05
on 2010/12/24 03:05
Change comment:
There is no comment for this version
To version 497.1
edited by Ravi Mendis
on 2010/12/24 00:59
on 2010/12/24 00:59
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,14 @@ 1 1 === What is Scala? === 2 2 3 -[[Scala>>http://www.scala-lang.org/]] is a modern, multi-paradigm JVM language that is most often compared to [[Groovy>>http://en.wikipedia.org/wiki/Groovy_(programming_language)]], [[Clojure>>http://en.wikipedia.org/wiki/Clojure]] or [[Erlang>>http://en.wikipedia.org/wiki/Erlang_(programming_language)]]. Its [[functional language>>http://en.wikipedia.org/wiki/Functional_programming]] foundations and built-in [[Actors>>http://en.wikipedia.org/wiki/Actor_model]]library make it especially attractive for concurrent computing. (Scala is an abbreviation for "scalable" hinting at its design goals).3 +[[Scala>>http://www.scala-lang.org/]] is a modern, multi-paradigm JVM language that is most often compared to [[Groovy>>http://en.wikipedia.org/wiki/Groovy_(programming_language)]], [[Clojure>>http://en.wikipedia.org/wiki/Clojure]] or [[Erlang>>http://en.wikipedia.org/wiki/Erlang_(programming_language)]]. Its [[functional language>>http://en.wikipedia.org/wiki/Functional_programming]] foundations and built-in Actors library make it especially attractive for concurrent computing. (Scala is an abbreviation for "scalable" hinting at its design goals). In this day and age of multi-core processors concurrent computing can not be ignored. 4 4 5 - In this day and age of multi-core processors concurrent computing can not be ignored.Many of the design features of Scala have been chosen with concurrency in mind, some of which may not be unfamiliar to Objective-C or WebObjects developers. Here's a summary:5 +Many of the design features of Scala have been chosen with concurrency in mind, some of which may not be unfamiliar to Objective-C or WebObjects developers. Here's a summary: 6 6 7 7 |= |= Objective-C |= Java |= Scala 8 -|= Immutability | Partial - via collections //e.g: NSArray/NSMutableArray// | No | Yes8 +|= Immutability | Partial - via Collections //e.g: NSArray/NSMutableArray// | No | Yes 9 9 |= Closures | Yes - via Blocks (//Extension//) | No | Yes - via Anonymous Functions 10 10 |= Static variables | Yes | Yes | No 11 -|= Static methods | Yes | Yes | No 11 +|= Static methods or functions | Yes | Yes | No 12 12 |= Concurrency | Yes - via [[Grand Central Dispatch>>http://en.wikipedia.org/wiki/Grand_Central_Dispatch]] (//Extension//) | //Yes - via Threads// | Yes - via [[Actors>>http://en.wikipedia.org/wiki/Actor_model]] 13 13 |= |= Weakly Typed |= --Strongly Typed-- |= Strongly Typed 14 14 ... ... @@ -16,7 +16,7 @@ 16 16 17 17 |= |= Objective-C |= Java |= Scala 18 18 |= Parametered methods | Yes //e.g: addObject: to~:// | No | Yes //e.g: add(object= ,to=)// 19 -|= Class composition | Yes - viaCategories |Yes - viaInterfaces |Yes - via [[Traits>>http://en.wikipedia.org/wiki/Trait_(computer_science)]]19 +|= Class composition | Categories | Interfaces | Traits 20 20 21 21 === Why Use Scala? === 22 22 ... ... @@ -162,7 +162,7 @@ 162 162 163 163 ==== Scala Annotations vs. Generated Accessors ==== 164 164 165 - Here's an example of accessing variables in the following languages:165 +An example of accessing variables in WebObjects with the following languages: 166 166 167 167 |= |= Objective-C |= Java |= Scala 168 168 |= getter | ##object name## | ##object.name()## | ##object.name##