Article Discussion
What's New in Scala 2.8: Package Objects
Summary: The third installment of a series of articles on the latest Scala release, Scala 2.8, Martin Odersky explains package objects.
4 posts on 1 page.      
« Previous 1 Next »
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: December 29, 2010 2:05 AM by Fred
Bill
Posts: 409 / Nickname: bv / Registered: January 17, 2002 4:28 PM
What's New in Scala 2.8: Package Objects
September 13, 2010 9:00 PM      
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.html

What do you think of package objects?
Thomas
Posts: 12 / Nickname: thomasm / Registered: January 27, 2009 1:41 AM
Re: What's New in Scala 2.8: Package Objects
September 14, 2010 11:38 PM      
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?
Benjamin
Posts: 1 / Nickname: bmjames / Registered: October 11, 2009 9:38 PM
Re: What's New in Scala 2.8: Package Objects
September 16, 2010 8:34 AM      
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.
Fred
Posts: 1 / Nickname: 57396 / Registered: August 3, 2008 11:03 PM
Re: What's New in Scala 2.8: Package Objects
December 29, 2010 2:05 AM      
How can I access the object Foo contained in a package object from Java ?

package object domain {
object Foo
}

domain$.MODULE$.Foo$.MODULE$ ?
4 posts on 1 page.
« Previous 1 Next »