[Bioperl-l] use of no_* to mean 'number_of', negative booleans
Chris Fields
cjfields at illinois.edu
Tue Jun 9 13:03:16 EDT 2009
I don't think it would require code changes right away; for the time
being no_* will just alias num_*. We can probably have deprecation
warnings activate when we reach a particular version.
chris
On Jun 9, 2009, at 11:26 AM, Scott Markel wrote:
> Chris,
>
> I just checked our code for the Sequence Analysis Collection in
> Pipeline Pilot. We've got a few places we'd need to make code
> changes, but we like your suggestion. So, no objections from us.
>
> Scott
>
> Scott Markel, Ph.D.
> Principal Bioinformatics Architect email: smarkel at accelrys.com
> Accelrys (SciTegic R&D) mobile: +1 858 205 3653
> 10188 Telesis Court, Suite 100 voice: +1 858 799 5603
> San Diego, CA 92121 fax: +1 858 799 5222
> USA web: http://www.accelrys.com
>
> http://www.linkedin.com/in/smarkel
> Vice President, Board of Directors:
> International Society for Computational Biology
> Co-chair: ISCB Publications Committee
> Associate Editor: PLoS Computational Biology
> Editorial Board: Briefings in Bioinformatics
>
>
>> -----Original Message-----
>> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
>> bounces at lists.open-bio.org] On Behalf Of Chris Fields
>> Sent: Tuesday, 09 June 2009 9:09 AM
>> To: BioPerl List
>> Subject: [Bioperl-l] use of no_* to mean 'number_of', negative
>> booleans
>>
>> All,
>>
>> 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.
>>
>> chris
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list