- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
deprecate objects like Predef / scala.swing.Swing
Sun, 2011-05-15, 20:51
Hi _
since there are package objects for a while now and their use increases,
objects like
scala.Predef and
scala.swing.Swing
seem a little outdated and, imho, should be deprecated, i.e. their types, vals,
defs, ... should be moved to better 'places'. I'm using these two objects as
examples, because for both there are very suitable package objects:
package object scala.swing
for scala.swing.Swing
pacakge object scala
package object scala.sys (used already for e.g. exit and error)
for scala.Predef
Another reason is, that writing stuff like
import scala.swing._
import scala.swing.Swing._
to get basic swing stuff is kinda bloaty and may be avoided if scala.swing.Swing
would be merged into the package object.
I don't know if there are other reasonable examples for objects which were
created before the golden era of package objects that could/should now be merged
into their better suited package objects.
if (hasBeenDiscussedBefore)
remind()
else
startDiscussion()
Best regards
Christian Krause aka wookietreiber