develooper Front page | perl.perl6.language | Postings from March 2005

Re: s/true/better name/

Thread Previous | Thread Next
Yuval Kogman
March 17, 2005 13:17
Re: s/true/better name/
Message ID:
On Thu, Mar 17, 2005 at 14:09:26 -0700, Luke Palmer wrote:

> Is wrong.  If answer() decides that it should start returning a more
> interesting value of true, then the test fails.

I think the only name for this function, from which you can actually
understand what it does, is 


as a context enforcer.

It's got the following properties:

	- well known and accepted semantic meaning
	- no associated action (it doesn't do anything)
	- relatives (scalar, list, hash)
	- it maps to '?', which is also the prefix to certain
	  operations, thus unambiguating further

As I see it 'so', 'whether', 'true', 'is', 'id', etc all have too
much english cargo, or are not exactly what it does.

The only one that I can see fitting here, as an action instead of a
context disambiguation is 'istrue', which takes an expr, and returns
a bool if expr is true.

 ()  Yuval Kogman <> 0xEBD27418  perl hacker &
 /\  kung foo master: /me sneaks up from another MIME part: neeyah!!!!!

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About