[Bioperl-l] out or toString method

Chad Matsalla chad@sausage.usask.ca
Fri, 7 Dec 2001 15:26:05 -0600 (CST)


On Fri, 7 Dec 2001, Ewan Birney wrote:
> I am not against this, but I have seen this sort of thing get abused.

I understand. I would suggest is as an efficient debugging tool.

> Are you suggested adding the appropiate to_string methods across all of
> bioperl?

Ummm... well... <cough> umm... No. I would suggest putting it into some
root class and then suggesting that modules implement it.

I will be putting them into all modules that I work with because I think
it is a good idea. I don't think I will overload like Ian suggested
because I think that the person using the method might find it _clearer_
to say:
print $thingy->toString();
then to overload something like double quotes.

I'd be willing to implement a toString function into modules that I only
marginally work with as well, if it helps.

I'll call it toString and I can always use /bin/sed^h^h^hsome substitution
mechanism to "fix" it later.


My humble opinion,

Chad Matsalla