[Bioperl-l] why string overload is bad

Ewan Birney birney at ebi.ac.uk
Tue Jun 28 09:56:39 EDT 2005

>> Not really the spirit of how and for whom Bioperl should be useful. A 
>> beginner could have a pretty hard time tracking down the mistake 
>> above, let alone the frustration this can generate in the course of 
>> such an exercise.
>> Do people really want to go the route of string-overloading the 
>> annotation classes? To me it's really over the top and is a step 
>> backwards for ease of using the toolkit.
> Hilmar definitely has a point here. Overloading also causes trouble with 
> respect to other code- take as an example Devel::ptkdb. Try to inspect a 
> variable, that contains or is an object of type Bio::Annotation::*. Of 
> course, one can always dump the data, but it is slower and this can be 
> rather annoying if you just want to take a peek into something. And I 
> have no doubt there would be other packages that fail because of the 
> overloading.

I have always been against string overloading. The subtly of the bugs
generated and non-obvious code paths (when Perl wants a number, does
it go via hte string-overloaded case...)

I also (personally) think overloading in C++ is bad. I just think overloading
is bad wherever.

>> Comments, opinions anybody?
>>     -hilmar
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

More information about the Bioperl-l mailing list