[Bioperl-l] Philosophy, BioPerl Object Creation

Hilmar Lapp hlapp at gnf.org
Thu Mar 27 10:25:18 EST 2003


On Thursday, March 27, 2003, at 03:32  AM, Matthew Pocock wrote:

>> argument list intact. Also, parameters may be used
>> in more than one
>> level in the hierarchy.
>>
>> 	-hilmar
>
> That seems a little rude. Can we get around this a bit
> by accessing the parameter via an accessor? e.g.
>
> my $self = my_super->new(@_);
> // pigColor was an argument but I need to know it to
> // set myself up - use an accessor
> my $pigColor = $self->pigColor();

At first sight yes, but what if along the evolution a derived class 
adds a parameter that later on the base class accepts too. If the 
derived class takes it off the stack after having recognized it, you 
cannot add this parameter to the base class because it will never see 
it. In other words, the base class becomes dependent on the derived 
class' behaviour which is certainly not good.

	-hilmar

>
> Matthew
>
>> -- 
>>
> -------------------------------------------------------------
>> Hilmar Lapp                            email: lapp
>> at gnf.org
>> GNF, San Diego, Ca. 92121              phone:
>> +1-858-812-1757
>>
> -------------------------------------------------------------
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at bioperl.org
>> http://bioperl.org/mailman/listinfo/bioperl-l
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------



More information about the Bioperl-l mailing list