Summary:
The third installment of a series of articles on the latest Scala release, Scala 2.8, Martin Odersky explains package objects.
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: December 29, 2010 2:05 AM by
Fred
|
The third installment of a series of articles on the latest Scala release, Scala 2.8, Martin Odersky explains package objects. http://www.artima.com/scalazine/articles/package_objects.htmlWhat do you think of package objects?
|
|
|
Scala is nice, but I fear it's getting too complicated. "A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away." I can't really tell what features should be removed, but maybe Scala should be viewed as a research language, and not so much as a language for the masses?
|
|
|
I'm confused by this statement in the article:
> Now assume you want to place a variable, planted, and a method, showFruit , directly into package gardening .
But in the subsequent examples, the variable planted and method showFruit seem to be in the package gardening.fruits , not directly in gardening .
|
|
|
How can I access the object Foo contained in a package object from Java ?
package object domain { object Foo }
domain$.MODULE$.Foo$.MODULE$ ?
|
|