[Pharo-project] compiled method inherits from Collection?

Frank Shearar frank.shearar at gmail.com
Tue Jun 19 05:32:15 EDT 2012


On 19 June 2012 10:27, Fernando Olivero <fernando.olivero at usi.ch> wrote:
> (Object>>#name) isCollection = true
>
> Actually is a subclass of ByteArray (instead of collaborating with one).
>
> Does this seem strange to anybody else? Is it really needed?

Yes, I found it a bit strange:
http://bugs.squeak.org/view.php?id=7570. As I understand it,
CompiledMethod isKindOf: ByteArray just because it uses a lot of
ByteArray's methods. It's a case of subclassing for code reuse,
because otherwise one would have to implement a bunch of
ByteArray-like methods in CompiledMethod.

frank

> Fernando
>




More information about the Pharo-dev mailing list