develooper Front page | perl.perl6.language | Postings from April 2002

Re: Please rename 'but' to 'has'.

Thread Previous | Thread Next
From:
Trey Harris
Date:
April 21, 2002 07:59
Subject:
Re: Please rename 'but' to 'has'.
Message ID:
Pine.BSF.4.44.0204211041170.50820-100000@bowser.eecs.harvard.edu
In a message dated Sat, 20 Apr 2002, Daniel S. Wilkerson writes:
> It is one of the standard refactoring tricks to replace the second one
> with the first.  The word "has" is in the positive, whereas "but" is a
> negative, but it assigns a positive, even more confusing.

"but" isn't a negative, not really.  "but" can be read basically two ways
in English, either as a synonym of "and" which happens to carry a tone of
warning or things not being quite ordinary, or as a synonym for "except
that".

0 but true

Means "0 *and also* true, even though this isn't the usual state of
affairs."  Makes perfect sense to me.  "has" makes no sense at all in this
context.  Were I to read:

0 has true

my first reaction would be, "huh?  Since when?"  Or imagine a Color class,
where you wanted to state that this black, if it were only just a bit
brighter, would be green:

$foo = Color.black but green;

I think that "black has green" just sounds plain weird.  "but" is
absolutely perfect, Larry.  I say keep it.

Trey
-- 
Trey Harris
Secretary and Executive
SAGE -- The System Administrators Guild (www.sage.org)
Opinions above are not necessarily those of SAGE.



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About