Doug Pardee
2008-03-06 06:00:04 UTC
[Nobody had an answer over in scala-user, so I thought
that I'd try here. Apologies to those who already read
this over there.]
(I am using 2.6.1)
I am a bit surprised to find that unapply and
unapplySeq cannot be overloaded based on the parameter
type. Well, they can be overloaded but then the object
cannot be used as an extractor object.
I am also surprised to find that unapply and
unapplySeq cannot both exist in the same extractor
object. That seems to be at odds with section 8.1.8 of
the reference (December 19 version).
It appears to me that an extractor object must have
only one extractor method defined. This seems
unnecessarily strict.
Have I misunderstood something here?
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
that I'd try here. Apologies to those who already read
this over there.]
(I am using 2.6.1)
I am a bit surprised to find that unapply and
unapplySeq cannot be overloaded based on the parameter
type. Well, they can be overloaded but then the object
cannot be used as an extractor object.
I am also surprised to find that unapply and
unapplySeq cannot both exist in the same extractor
object. That seems to be at odds with section 8.1.8 of
the reference (December 19 version).
It appears to me that an extractor object must have
only one extractor method defined. This seems
unnecessarily strict.
Have I misunderstood something here?
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ