in reply to Re: Re: How can I inherit from Bit::Vector?
in thread How can I inherit from Bit::Vector?

Thanks for the help!

Still, it seems that Bit::Vector seems designed not to allow inheritance. Almost all the methods, such as shift_left(), check to see that they are handed a genuine Bit::Vector. If it isn't a Bit::Vector an error is generated.

I'm beginning to think that I need to use a different strategy. Perhaps I should make an object that has a USES_A rather than an IS_A relationship with Bit:Vector.

It should work perfectly the first time! - toma

  • Comment on Re: Re: Re: How can I inherit from Bit::Vector?

Replies are listed 'Best First'.
Re: Re: Re: Re: How can I inherit from Bit::Vector?
by Fastolfe (Vicar) on Nov 05, 2001 at 04:21 UTC
    Yah that approach would probably be best.

    I'd still be interested in hearing why the author chose to go through all of these hoops to prevent someone from inheriting Bit::Vector. This almost seems a bit silly.