This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Fwd: Review Request: r20071

No replies
dubochet
Joined: 2008-06-30,
User offline. Last seen 1 year 36 weeks ago.

The following review (of r20071) may be of interest to other people concerned with Manifests.

> -----------------------------------------------------------
> Review: http://chara2.epfl.ch/r/138/
> Change: http://lampsvn.epfl.ch/trac/scala/changeset/20071
> -----------------------------------------------------------
>
> Ok, generally, I think the proposed change is reasonable: it makes the subtyping relation closer to being correct by special casing the AnyVal classes.
>
> However, my position has always been that manifests aren't the right handle for doing reflection. Manifests will be hooks into the reflection library but they will not be the reflective representation of the program. The reason for that is that entering the reflective world necessarily has a significant performance penalty, and the Manifests must remain lightweight, as they are used for performance critical functions (for example in Arrays). I understand that, whilst waiting for the reflection library, there is a strong temptation to make Manifests like a proto-reflection library, a direction that this change takes.
>
> I do not want to prevent changes to Manifest. I probably should never have added the original subtyping and equality methods to Manifests. I probably should have complained more loudly when the first "improvement" to the subtyping method transformed it from just a forwarder to the erased type to a very broken implementation of Scala's subtyping. But now that this is the case, I agree that it must become more correct.
>
> Once the reflection library is ready (soon, I hope), the subtyping method of Manifests can either be deprecated (get a proper reflection type and test your types there) or reimplemented as forwarders. In any case, the proposed change doesn't seem to make the transition any harder, so: ship it!

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland