I did my brief research regarding Scala’s object concept. The notion behind the key word object is that every element in Scala language is object even the primitive type int. So there isn’t even class level fields and methods. For example you can’t implement Singleton design pattern or to use static methods and fields. The way to represent static data or Singleton is definition of object. The Scala object is lazily instantiated by the system hence it’s doesn’t support constructor with multiple arguments. For the whole info regarding object please see http://programming-scala.labs.oreilly.com/ch07.html#ClassesAndObjects.
-
You are currently browsing the archives for March, 2010
-
Archives
- August 2010 (5)
- July 2010 (8)
- June 2010 (12)
- May 2010 (14)
- April 2010 (9)
- March 2010 (1)
- February 2010 (2)
- December 2009 (2)
- November 2009 (2)
- October 2009 (4)
- August 2009 (4)
- June 2009 (1)