[Bioperl-l] use of no_* to mean 'number_of', negative booleans
cjfields at illinois.edu
Tue Jun 9 14:55:48 EDT 2009
We could probably alias nof_* with num_* just for consistency, but
leave nof_* as is and not deprecate it (I don't think anyone would
confuse nof* with no*).
On Jun 9, 2009, at 1:41 PM, Florent Angly wrote:
> Agree! no_* is prone to misunderstandings.
> Also, some BioPerl code uses nof_*, which I quite like.
> Hilmar Lapp wrote:
>> Great suggestions, I'm all for it.
>> On Jun 9, 2009, at 12:08 PM, Chris Fields wrote:
>>> I've noticed a few methods in bioperl with names like 'no_Foo'
>>> that mean 'number of Foo' (such as SimpleAlign's no_sequences).
>>> The problem I foresee are possible ambiguities, particularly with
>>> negative boolean checks (eg 'no_Foo' could also mean 'this
>>> instance contains no Foo'), something that BioPerl also has with
>>> various settings.
>>> I suggest we alias these as num_* to disambiguate that. There's
>>> no easy way to change already in-place flag setting w/o going
>>> through a deprecation cycle, but we can promote using positive
>>> booleans where possible (eg 'is_foo' or 'has_foo' instead of
>>> 'no_foo'). We can leave the older 'no_*' methods as is for the
>>> time being and maybe deprecate them later.
>>> If no one has objections I'll add these in as needed.
>>> Bioperl-l mailing list
>>> Bioperl-l at lists.open-bio.org
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
More information about the Bioperl-l