Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion perl6-language@perl.org
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Damian Conway  
View profile  
 More options Aug 5 2002, 7:48 pm
Newsgroups: perl.perl6.language
From: dam...@conway.org (Damian Conway)
Date: Tue, 06 Aug 2002 08:59:47 +1000
Local: Mon, Aug 5 2002 6:59 pm
Subject: Re: perl6-language@perl.org
Chip observed:

> Yes, I got that, and I even kind of like it.  It's the idea that this
> might work as a "temp sub", rather than a "my sub", that I'm not at
> all sanguine about.

See my comment below.

> Why, it's almost surely bad even for your sample scenario!  Imagine
> what might happen inside &DBI::execute if the values of boolean ops
> change globally.  You'll break simple stuff like:

>     @socket[$hostname eq 'localhost']

Code like that (which relies on the poorly specified standard values of
truth and falsehood) *deserves* to break. See me argument at the end of
this message.

> Yes, if you somehow manage to fix numification you'll be OK with this
> specific case, but I hope the principle is clear: Lexical overrides
> good, global overrides bad^Wextremely hazardous.

I *thoroughly* agree. I totally agree.

But that won't stop me from telling people how to do bad things when they ask. ;-)

BTW, I would strongly argue that Perl ought to have a *proper* boolean type.
In the same way it has proper numeric and string types. There should be
built-ins C<true> and C<false> that return the canonical true and false
values. These values should have numeric conversions (to 1 and 0) and string
conversions (to C<"true"> and C<"false" but false>). They should be used
by all built-ins (and preferably in user code as well).

Damian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.