RSSAmplifier

soc.me · Dec 20, 2017

Language Design: Package Objects in Scala

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

Scala has the concept of package objects which allow the declaration of methods, classes etc. that appear as if they existed directly inside a package, not enclosed in an object or a class. Given the definition of a method qux for a package foo.bar , the method can be called with foo.bar.qux() . The Issue Package objects are useful, but the way they are defined is pretty weird, and one of the…

Read on /languages/package-objects-in-scala.html

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.