Skip to content

Review/fix definition of IArray #11298

Closed
@odersky

Description

@odersky

IArray needs to be reviewed and tested before we can release it.

Right now, I see see several issues:

  • Missing methods, e.g. toList is not defined, but there are many others.
  • Inefficient implementation. Since IArray[A] is backed by Array[A] every access to
    the underlying array goes through reflection. We need to find a way to inline the access
    methods. This would be easier if we can expand opaque types before pickling since
    then inline methods and opaque types can co-exist.
  • Package structure. Should the full name be scala.opaques.IArray , or is something else better?
scala> val xs = IArray(1, 2, 3)                                                                                       
val xs: opaques.IArray[Int] = Array(1, 2, 3)

scala> xs.toList                                                                                                           
1 |xs.toList
  |^^^^^^^^^
  |value toList is not a member of opaques.IArray[Int]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions