Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jun 8, 2012
  1. Eugene Burmako

    removes array tags

    xeno-by authored
    Before 2.10 we had a notion of ClassManifest that could be used to retain
    erasures of abstract types (type parameters, abstract type members) for
    being used at runtime.
    With the advent of ClassManifest (and its subtype Manifest)
    it became possible to write:
      def mkGenericArray[T: Manifest] = Array[T]()
    When compiling array instantiation, scalac would use a ClassManifest
    implicit parameter from scope (in this case, provided by a context bound)
    to remember Ts that have been passed to invoke mkGenericArray and
    use that information to instantiate arrays at runtime (via Java reflection).
    When redesigning manifests into what is now known as type tags, we decided
    to explore a notion of ArrayTags that would stand for abstract and pure array
    creators. Sure, ClassManifests were perfectly fine for this job, but they did
    too much - technically speaking, one doesn't necessarily need a java.lang.Class
    to create an array. Depending on a platform, e.g. within JavaScript runtime,
    one would want to use a different mechanism.
    As tempting as this idea was, it has also proven to be problematic.
    First, it created an extra abstraction inside the compiler. Along with class tags
    and type tags, we had a third flavor of tags - array tags. This has threaded the
    additional complexity though implicits and typers.
    Second, consequently, when redesigning tags multiple times over the course of
    Scala 2.10.0 development, we had to carry this extra abstraction with us, which
    exacerbated the overall feeling towards array tags.
    Finally, array tags didn't fit into the naming scheme we had for tags.
    Both class tags and type tags sound logical, because, they are descriptors for
    the things they are supposed to tag, according to their names.
    However array tags are the odd ones, because they don't actually tag any arrays.
    As funny as it might sound, the naming problem was the last straw
    that made us do away with the array tags. Hence this commit.
  2. Eugene Burmako

    removes tags and their incantations from Predef

    xeno-by authored
    All tags and reflection-related stuff requires a prefix,
    be it scala.reflect for simple tags (ArrayTags and ClassTags),
    or scala.reflect.basis/scala.reflect.runtime.universe for type tags.
Commits on Apr 23, 2012
  1. Eugene Burmako

    migrates stdlib and compiler to tags

    xeno-by authored
    * all usages of ClassManifest and Manifest are replaced with tags
    * all manifest tests are replaced with tag tests
Something went wrong with that request. Please try again.