- About Scala
- In the Enterprise
- Scala Community
- Language Research
- In the Press
- The Scala Team
- Scala's Prehistory
- Contact Us
- Learning Scala
- Tour of Scala
- Scala API
- Setup & Getting Started
- Programming Guides
- Other Guides
- Code Examples
- Scala Developers
patterns like multiton for stdlib?
I recently tried to pull-request a multiton trait to stdlib @ github 
(you can also find the trait enclosed), which has been rejected with the
comment that it "should be directed toward an external library".
I imagine, everyone would like the standard library to contain
implementations of common patterns, to reduce the fuss to get that pattern
on the classpath and therefore make programming easier for everyone.
Unfortunately, there is no clear definition of "common" and it is unclear,
whether a pattern, like the multiton pattern , should find a home in
scala's stdlib or not.
I guess, a good question is: what are the criteria for a pattern to be in
the standard library?
- general enough? (as in: is the pattern general enough, to be in a
general purpose programming language / stdlib of that language?)
- usefulness (How does one define usefulness? enough ppl wanting it?)
- usefulness compared to paradigms of the language (pattern vs anti-pattern)
- references in literature? (as in: the pattern has been (academically)
suggested to be a (good) solution for a common problem)
Is there a guideline for contributers on that topic? If not, I think,
there should be.
What are your opinions on the topic in general and in special about
wookietreiber aka Christian Krause
P.S.: some notes on the multiton trait:
- I don't neccessarily think that it should be in package scala, I guess
package scala.util would maybe be a better choice
- on the abstract factory: currently `val create: A => B` but may also be
def create(a: A): B