Changes for page WebObjects with Scala
Last modified by Ravi Mendis on 2011/05/10 02:10
From version 467.1
edited by Ravi Mendis
on 2010/12/24 00:39
on 2010/12/24 00:39
Change comment:
There is no comment for this version
To version 471.1
edited by Ravi Mendis
on 2010/12/24 00:44
on 2010/12/24 00:44
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,6 +1,6 @@ 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 library make sit 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.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 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 ... ... @@ -44,7 +44,7 @@ 44 44 Scala doesn't have static variables or methods. Instead Scala employs the [[Singleton Pattern>>http://en.wikipedia.org/wiki/Singleton_pattern]] which is built into the language and is **thread-safe**: a class can have a //Companion Object// that will allow you to achieve something equivalent to static variables - but better. 45 45 46 46 You don't have to worry about synchronizing access to shared mutable fields in a concurrent application. 47 -This is not however true for mu table ##val## e.g:##NSMutableArray##, ##scala.collection.mutable.ListBuffer##whichyou will have to synchronizethe adding to or removing from.47 +(This is not however true when for example you have a ##val## declared as a ##NSMutableArray##. You will still have to synchronize when adding to or removing from this mutable field). 48 48 49 49 The following is an example of the use of a //Companion Object// for Talent in Scala instead of Talent static fields in Java. 50 50