[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

can someone improve on this multiple inheritence methodology?

Ara.T.Howard

12/14/2005 9:06:00 PM

9 Answers

Trans

12/15/2005 12:04:00 AM

0

I like the fact that this gets around the module method inheritance
issue. This is how #include should work to begin with, but without the
extra baggage of modules in modules (and if neccessary add an extra
"don't inheirt" section indicator in order to have every possibility).

T.

Ara.T.Howard

12/15/2005 3:30:00 AM

0

dblack

12/15/2005 4:16:00 AM

0

Ara.T.Howard

12/15/2005 4:22:00 AM

0

Eero Saynatkari

12/15/2005 4:36:00 AM

0

unknown wrote:
> On Thu, 15 Dec 2005 dblack@wobblini.net wrote:
>
>>> class Module
>>> def inherit other
>>
>> My main suggestion would be to rename this method. I don't think this
>> is an inheritance operation. At least, it seems potentially confusing
>> to "inherit" a module, since inheritance already means something else
>> and modules already do other things.
>
> true true. hmmm... how is it different here? you'll have all the
> class_methods and all the instance_methods.... and Superclass === self
> with
> be true...
>
> i'm sure there must be a catch though...
>
> can you think of a better name?

Well.. #include :)
Also, of course, #import, #mix, #combine and #greyskull.

The design itself seems to be fine. An alternative would
be to create an enhanced #include which would take over
if require 'better-include' is encountered (until such
time that this makes it to the stdlib).

> cheers.
>
> -a


E

--
Posted via http://www.ruby-....


Ara.T.Howard

12/15/2005 4:54:00 AM

0

dblack

12/15/2005 5:34:00 AM

0

Ara.T.Howard

12/15/2005 5:55:00 AM

0

Ara.T.Howard

12/21/2005 3:28:00 PM

0