Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ReferenceRegion shouldn't extend Ordered #511
Currently, ReferenceRegion extends Ordered (everything here also applies, mutatis mutandis, to ReferenceRegionWithOrientation).
This is a problem semantically, as according to Scala's docs (http://www.scala-lang.org/api/current/index.html#scala.math.Ordered) Ordered should only be used for types that have "a single, natural ordering" -- while we certainly can (and will) want to sort ReferenceRegions in multiple different ways.
Second, it has become a problem concretely as well: in defining some natural operations on RDDs of ReferenceRegions, I'm coming across a "diverging implicit expansion" error (http://stackoverflow.com/questions/4883906/what-is-a-diverging-implicit-expansion-error) that seems to be related to using Ordered on ReferenceRegions and subclasses of ReferenceRegion.
The solution I'm proposing to this is threefold: