- 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
Automatic wiring of manifests?
it's just a minor thing - but somehow I feel that all the wiring with
manifests I have to do to achieve rather mundane things like this:
class Coordinate[T <: Dimensional, P] (values: Seq[P]) (
implicit ddesc: Dimension[T], prec: Numeric[P], m: Manifest[P]
private var _coord = new Array[P](ddesc.dim);
def coord: Array[P] = _coord
could be provided by the compiler rather automatically.
Would it be possible to "enhance" the compiler to cause him to provide the
manifests required *indirectly* by a given method as an anonymous/automatic
Maybe I did something wrong but I have those Manifests (when dealing with
arrays and matches) all over the place and it feels like boilerplate. And as
scala already has the basic mechanisms for "unerasure" it would be nice if
things would work out more silently "under the hood" where possible.
Just a thought...