The Artima Developer Community
Sponsored Link

Articles Forum
What's New in Scala 2.8: Package Objects

3 replies on 1 page. Most recent reply: Dec 29, 2010 2:05 AM by Fred Nowak

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

What's New in Scala 2.8: Package Objects Posted: Sep 13, 2010 10:00 PM
Reply to this message Reply
Advertisement
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 Mueller

Posts: 18
Nickname: thomasm
Registered: Jan, 2009

Re: What's New in Scala 2.8: Package Objects Posted: Sep 15, 2010 12:38 AM
Reply to this message Reply
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 James

Posts: 7
Nickname: bmjames
Registered: Oct, 2009

Re: What's New in Scala 2.8: Package Objects Posted: Sep 16, 2010 9:34 AM
Reply to this message Reply
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 Nowak

Posts: 1
Nickname: 57396
Registered: Aug, 2008

Re: What's New in Scala 2.8: Package Objects Posted: Dec 29, 2010 2:05 AM
Reply to this message Reply
How can I access the object Foo contained in a package object from Java ?

package object domain {
object Foo
}

domain$.MODULE$.Foo$.MODULE$ ?

Flat View: This topic has 3 replies on 1 page
Topic: Rich Component Skins in Flex 4 Previous Topic   Next Topic Topic: What's New in Scala 2.8: The Architecture of Scala Collections

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use