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
s/true/better name/
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 28 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
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
 
Juerd  
View profile  
 More options Mar 15 2005, 4:51 am
Newsgroups: perl.perl6.language
From: ju...@convolution.nl (Juerd)
Date: Tue, 15 Mar 2005 10:51:57 +0100
Local: Tues, Mar 15 2005 4:51 am
Subject: s/true/better name/
In #perl6, Freenode, after again having to explain that "true" is the
opposite of "not" and NOT the value for "true", and that "false" doesn't
exist, and that the real true value is "bool::true" and shouldn't be used
much, and that no, it isn't "true", and no, "true" doesn't always return
"bool::true", but despite its name can also return "bool::false", and
then explaining everything again, we kind of agreed that "true" is a
misleading name. In my opinion, it's the biggest violation of the whole
least surprise thing in Perl 6's current design.

Autrijus suggested "indeed" or "id", of which I like "indeed" better,
because I'd like to continue using "id" with databases.

Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html


 
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.
Yuval Kogman  
View profile  
 More options Mar 15 2005, 5:13 am
Newsgroups: perl.perl6.language
From: nothingm...@woobling.org (Yuval Kogman)
Date: Tue, 15 Mar 2005 12:13:52 +0200
Local: Tues, Mar 15 2005 5:13 am
Subject: Re: s/true/better name/

On Tue, Mar 15, 2005 at 10:51:57 +0100, Juerd wrote:
> Autrijus suggested "indeed" or "id", of which I like "indeed" better,
> because I'd like to continue using "id" with databases.

whether?

--
 ()  Yuval Kogman <nothingm...@woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me beats up some cheese: neeyah!!!!!!!!!!!!!!!!!

  application_pgp-signature_part
< 1K Download

 
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.
Juerd  
View profile  
 More options Mar 15 2005, 11:31 am
Newsgroups: perl.perl6.language
From: ju...@convolution.nl (Juerd)
Date: Tue, 15 Mar 2005 17:31:35 +0100
Local: Tues, Mar 15 2005 11:31 am
Subject: Re: s/true/better name/
Autrijus Tang skribis 2005-03-16  0:25 (+0800):

> On Tue, Mar 15, 2005 at 08:23:19AM -0800, Larry Wall wrote:
> > I'd go with either "istrue" or "so".  "ok" is another possibility,
> > though that seems to connote definedness more than truth.
> Hmm, "so" is so good. So can we make it so? :)

So is great for Perl poetry too.

Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html


 
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.
Larry Wall  
View profile  
 More options Mar 15 2005, 11:41 am
Newsgroups: perl.perl6.language
From: la...@wall.org (Larry Wall)
Date: Tue, 15 Mar 2005 08:41:04 -0800
Local: Tues, Mar 15 2005 11:41 am
Subject: Re: s/true/better name/
On Tue, Mar 15, 2005 at 12:13:52PM +0200, Yuval Kogman wrote:

: On Tue, Mar 15, 2005 at 10:51:57 +0100, Juerd wrote:
:
: > Autrijus suggested "indeed" or "id", of which I like "indeed" better,
: > because I'd like to continue using "id" with databases.
:
: whether?

That's an interesting possibility, though I think about half the people
would misspell it.  Maybe that's a feature.  It works well for:

    $yesno = whether any(@foo) == @any(@bar);

I don't mind it being long.

I should point out I'm rethinking the idea of whether or not whether and
not should be list operators.  "not @foo" would have unexpected consequences
if it forces list context, so I think we better let people hyper those
manually if needed.  I think we can leave "not" at the precedence of
list operators without actually making it one, but maybe we should make
a separate precedence level for it to keep list op precedence "pure".

Larry


 
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.
Larry Wall  
View profile  
 More options Mar 15 2005, 11:23 am
Newsgroups: perl.perl6.language
From: la...@wall.org (Larry Wall)
Date: Tue, 15 Mar 2005 08:23:19 -0800
Local: Tues, Mar 15 2005 11:23 am
Subject: Re: s/true/better name/
On Tue, Mar 15, 2005 at 10:51:57AM +0100, Juerd wrote:

: Autrijus suggested "indeed" or "id", of which I like "indeed" better,
: because I'd like to continue using "id" with databases.

"id" is too heavily overloaded with identifiers and identities and such.
But "indeed" doesn't work right in context, "while indeed..."

I'd go with either "istrue" or "so".  "ok" is another possibility,
though that seems to connote definedness more than truth.

Larry


 
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.
Autrijus Tang  
View profile  
 More options Mar 15 2005, 11:25 am
Newsgroups: perl.perl6.language
From: autri...@autrijus.org (Autrijus Tang)
Date: Wed, 16 Mar 2005 00:25:45 +0800
Local: Tues, Mar 15 2005 11:25 am
Subject: Re: s/true/better name/

On Tue, Mar 15, 2005 at 08:23:19AM -0800, Larry Wall wrote:
> I'd go with either "istrue" or "so".  "ok" is another possibility,
> though that seems to connote definedness more than truth.

Hmm, "so" is so good. So can we make it so? :)

Thanks,
/Autrijus/

  application_pgp-signature_part
< 1K Download

 
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.
Juerd  
View profile  
 More options Mar 15 2005, 11:57 am
Newsgroups: perl.perl6.language
From: ju...@convolution.nl (Juerd)
Date: Tue, 15 Mar 2005 17:57:57 +0100
Local: Tues, Mar 15 2005 11:57 am
Subject: Re: s/true/better name/
Larry Wall skribis 2005-03-15  8:41 (-0800):

> On Tue, Mar 15, 2005 at 12:13:52PM +0200, Yuval Kogman wrote:
> : On Tue, Mar 15, 2005 at 10:51:57 +0100, Juerd wrote:
> : > Autrijus suggested "indeed" or "id", of which I like "indeed" better,
> : > because I'd like to continue using "id" with databases.
> : whether?
> That's an interesting possibility, though I think about half the people
> would misspell it.  Maybe that's a feature.  It works well for:
>     $yesno = whether any(@foo) == @any(@bar);

Seeing it in an example, I love this suggestion.

And re its spelling, that's a very good feature, because it'll slowly
teach me how to spell this word. And when I know how to spell it, I can
use it on IRC without dict(1)ing to see if I remembered correctly. This
will eventually save me hours! :)

> I should point out I'm rethinking the idea of whether or not whether and
> not should be list operators.

Nice use of both languages.

I've wondered today how their being list ops would work in practice.
Does it work like any(), all(), or is only one of the elements evaluated?

Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html


 
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.
Nicholas Clark  
View profile  
 More options Mar 15 2005, 12:53 pm
Newsgroups: perl.perl6.language
From: n...@ccl4.org (Nicholas Clark)
Date: Tue, 15 Mar 2005 17:53:58 +0000
Local: Tues, Mar 15 2005 12:53 pm
Subject: Re: s/true/better name/

On Tue, Mar 15, 2005 at 05:57:57PM +0100, Juerd wrote:
> And re its spelling, that's a very good feature, because it'll slowly
> teach me how to spell this word. And when I know how to spell it, I can
> use it on IRC without dict(1)ing to see if I remembered correctly. This
> will eventually save me hours! :)

One problem you may find with dict is that one common misspelling, "wether",
is also a valid English word, which any decent word list should contain.
(It's a castrated ram)

Nicholas Clark


 
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.
Juerd  
View profile  
 More options Mar 15 2005, 12:57 pm
Newsgroups: perl.perl6.language
From: ju...@convolution.nl (Juerd)
Date: Tue, 15 Mar 2005 18:57:01 +0100
Local: Tues, Mar 15 2005 12:57 pm
Subject: Re: s/true/better name/
Nicholas Clark skribis 2005-03-15 17:53 (+0000):

> On Tue, Mar 15, 2005 at 05:57:57PM +0100, Juerd wrote:
> > And re its spelling, that's a very good feature, because it'll slowly
> > teach me how to spell this word. And when I know how to spell it, I can
> > use it on IRC without dict(1)ing to see if I remembered correctly. This
> > will eventually save me hours! :)
> One problem you may find with dict is that one common misspelling, "wether",
> is also a valid English word, which any decent word list should contain.
> (It's a castrated ram)

Dict uses dictionaries, not just word lists. It outputs the
definition(s), so this misspelling is easily detected.

I know both words exists. I just can't manage to remember which one is
which, and maybe Perl 6 can help me :)

Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html


 
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.
Rod Adams  
View profile  
 More options Mar 15 2005, 1:40 pm
Newsgroups: perl.perl6.language
From: r...@rodadams.net (Rod Adams)
Date: Tue, 15 Mar 2005 12:40:43 -0600
Local: Tues, Mar 15 2005 1:40 pm
Subject: Re: s/true/better name/

I don't see the point of making them list ops. Leaving them at that
precedence level makes sense, but leave them unary. For a list version,
you can write C<?any(...)> or C<?none(...)> to do the same thing.

-- Rod Adams


 
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.
David Storrs  
View profile  
 More options Mar 15 2005, 11:54 pm
Newsgroups: perl.perl6.language
From: dsto...@dstorrs.com (David Storrs)
Date: Tue, 15 Mar 2005 20:54:42 -0800
Local: Tues, Mar 15 2005 11:54 pm
Subject: Re: s/true/better name/

On Tue, Mar 15, 2005 at 08:23:19AM -0800, Larry Wall wrote:
> On Tue, Mar 15, 2005 at 10:51:57AM +0100, Juerd wrote:
> : Autrijus suggested "indeed" or "id", of which I like "indeed" better,
> : because I'd like to continue using "id" with databases.

> "id" is too heavily overloaded with identifiers and identities and such.
> But "indeed" doesn't work right in context, "while indeed..."

> I'd go with either "istrue" or "so".  "ok" is another possibility,
> though that seems to connote definedness more than truth.

It also breaks a huge percentage of the testing code that we would
like to be able to automagically port from P5 to P6.

--Dks

--
dsto...@dstorrs.com


 
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.
Marcus Adair  
View profile  
 More options Mar 15 2005, 2:28 pm
Newsgroups: perl.perl6.language
From: gco...@gmail.com (Marcus Adair)
Date: Tue, 15 Mar 2005 12:28:15 -0700
Local: Tues, Mar 15 2005 2:28 pm
Subject: Re: s/true/better name/
Isn't saying "false doesn't exist" like saying, "dark doesn't exist"?
Why have a word for that?

I'm really afraid I'm missing something obvious here, but I'm worried
that neither "whether" nor "indeed" work very well in many contexts. It
seems to me that testing trueness exists in so many contexts that it's
going to be hard to find an English word that fits all the important
ones.

Additionally I question whether this is truly a case improving to the
point of least surprise? After all, I don't know a programmer who's
going to be surprised by what true means. There are still *some* things
you may have to learn in software dev 101 ;)

Marcus


 
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.
Luke Palmer  
View profile  
 More options Mar 16 2005, 1:33 pm
Newsgroups: perl.perl6.language
From: l...@luqui.org (Luke Palmer)
Date: Wed, 16 Mar 2005 11:33:19 -0700
Local: Wed, Mar 16 2005 1:33 pm
Subject: Re: s/true/better name/

Marcus Adair writes:
> Additionally I question whether this is truly a case improving to the
> point of least surprise? After all, I don't know a programmer who's
> going to be surprised by what true means. There are still *some* things
> you may have to learn in software dev 101 ;)

The problem is this (common) one:

    if answer() == true {
        # do something
    }

We want to give the programmer no good way to do that, because it's
wrong.

Either that, or we could define true to be the disjunction of all things
true.  Then that would work correctly, even when answer() is returning
something more interesting than a bare bool.

Luke


 
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.
Luke Palmer  
View profile  
 More options Mar 16 2005, 1:30 pm
Newsgroups: perl.perl6.language
From: l...@luqui.org (Luke Palmer)
Date: Wed, 16 Mar 2005 11:30:16 -0700
Local: Wed, Mar 16 2005 1:30 pm
Subject: Re: s/true/better name/

Meany other hackers halve trouble remembering witch is witch to.  I'm
all ways perfectly rite thou.

Luke


 
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.
Larry Wall  
View profile  
 More options Mar 16 2005, 1:41 pm
Newsgroups: perl.perl6.language
From: la...@wall.org (Larry Wall)
Date: Wed, 16 Mar 2005 10:41:54 -0800
Local: Wed, Mar 16 2005 1:41 pm
Subject: Re: s/true/better name/
On Tue, Mar 15, 2005 at 12:28:15PM -0700, Marcus Adair wrote:

: Isn't saying "false doesn't exist" like saying, "dark doesn't exist"?
: Why have a word for that?
:
: I'm really afraid I'm missing something obvious here, but I'm worried
: that neither "whether" nor "indeed" work very well in many contexts. It
: seems to me that testing trueness exists in so many contexts that it's
: going to be hard to find an English word that fits all the important
: ones.

Most of those contexts are implicitly boolean, and this function would
be redundant there.  The main use for this function is to provide a
boolean context for its argument and return 0 or 1 when you really
do want 0 or 1 for some context that isn't directly boolean.  This
is actually relatively rare.

: Additionally I question whether this is truly a case improving to the
: point of least surprise? After all, I don't know a programmer who's
: going to be surprised by what true means. There are still *some* things
: you may have to learn in software dev 101 ;)

The point is that most people coming from other languages would expect
"true" to be a true value, not a function testing whether some other
value is true.  It would be particularly confusing if we made it
default to testing $_, in which case

    $_ = 0;
    if 1 == true { say "true" } else { say "false" }

would say "false".  It is a little less confusing in

    given $value {
    when true {...}

except that, in fact, both of those cases would be syntax errors if
true were a function, since it would parse the following block as an
argument to true.

So if we really want to test a value for whether its .bit property
returns the bool::true value, we will probably require you to use
the method syntax:

    when .true {...}

and then it's obvious that there's some object involved.  (And it parses
right, because .true would require parens if there were arguments.)  On
the other hand, these also do the same thing underneath, at least in
the abstract:

    when ?$_ {...}
    if $_ {...}

The optimizer is likely to bypass actually calling the .bit/.true method on
known types, however.

Larry


 
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.
Mark J. Reed  
View profile  
 More options Mar 16 2005, 1:41 pm
Newsgroups: perl.perl6.language
From: mark.r...@turner.com (Mark J. Reed)
Date: Wed, 16 Mar 2005 13:41:56 -0500
Local: Wed, Mar 16 2005 1:41 pm
Subject: Re: s/true/better name/

What do you mean "wrong"?  It looks perfectly valid to me.  It's
redundant, since answer() by itself would suffice as a condition with no
comparison, but does that make it wrong?

 
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.
Larry Wall  
View profile  
 More options Mar 16 2005, 1:48 pm
Newsgroups: perl.perl6.language
From: la...@wall.org (Larry Wall)
Date: Wed, 16 Mar 2005 10:48:53 -0800
Local: Wed, Mar 16 2005 1:48 pm
Subject: Re: s/true/better name/
On Wed, Mar 16, 2005 at 01:41:56PM -0500, Mark J. Reed wrote:
: Luke Palmer wrote:

:
: >Marcus Adair writes:

: >> Additionally I question whether this is truly a case improving to the
: >> point of least surprise? After all, I don't know a programmer who's
: >> going to be surprised by what true means. There are still *some* things
: >> you may have to learn in software dev 101 ;)
: >
: >The problem is this (common) one:
: >
: >    if answer() == true {
: >        # do something
: >    }
: >
: >We want to give the programmer no good way to do that, because it's
: >wrong.
: >
:
: What do you mean "wrong"?  It looks perfectly valid to me.  It's
: redundant, since answer() by itself would suffice as a condition with no
: comparison, but does that make it wrong?

It could be forced to work if MMD is smart enough to call an ==
function that we were smart enough to define that is smart enough to
look at the .bit property of the left argument to coerce that value
to 0 or 1.  But the naive implementation ends up comparing 42 == 1
and returning false.  Unfortunately, == is one of those things we'd
like to optimize heavily, and it's hard if there's a lot of MMD
cruft in the way.

Larry


 
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.
Rod Adams  
View profile  
 More options Mar 16 2005, 2:22 pm
Newsgroups: perl.perl6.language
From: r...@rodadams.net (Rod Adams)
Date: Wed, 16 Mar 2005 13:22:06 -0600
Local: Wed, Mar 16 2005 2:22 pm
Subject: Re: s/true/better name/

Doesn't  C< +?(...) > take care of those cases?

Sure, it's line noise, but do we really need a new keyword for something
that's "relatively rare"?
Especially when that keyword is likely to confuse people a lot more than
the application of two unary operators?

-- Rod Adams


 
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.
Autrijus Tang  
View profile  
 More options Mar 16 2005, 3:40 pm
Newsgroups: perl.perl6.language
From: autri...@autrijus.org (Autrijus Tang)
Date: Thu, 17 Mar 2005 04:40:44 +0800
Local: Wed, Mar 16 2005 3:40 pm
Subject: Re: s/true/better name/

On Wed, Mar 16, 2005 at 12:09:40PM -0800, Larry Wall wrote:
> whereas as a native English speaker would probably expect

>     $x = whether($a or $b);

> So I'm thinking we'll just go back to "true", both for that reason,
> and because it does syntactically block the naughty meaning of true as
> a term (as long as we don't default true() to $_), as Luke reminded us.

But "true()" reads weird, and it does not read like an unary (or list)
operator at all to me. As the bikeshedding is still going on, may I
suggest "aye()"?  It is the same length as "not()", both are adverbs,
and is rare enough to not conflict with user-defined subs.

Thanks,
/Autrijus/

  application_pgp-signature_part
< 1K Download

 
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.
Larry Wall  
View profile  
 More options Mar 16 2005, 3:09 pm
Newsgroups: perl.perl6.language
From: la...@wall.org (Larry Wall)
Date: Wed, 16 Mar 2005 12:09:40 -0800
Local: Wed, Mar 16 2005 3:09 pm
Subject: Re: s/true/better name/
On Wed, Mar 16, 2005 at 01:22:06PM -0600, Rod Adams wrote:
: Larry Wall wrote:

:
: >On Tue, Mar 15, 2005 at 12:28:15PM -0700, Marcus Adair wrote:
: >: Isn't saying "false doesn't exist" like saying, "dark doesn't exist"?
: >: Why have a word for that?
: >:
: >: I'm really afraid I'm missing something obvious here, but I'm worried
: >: that neither "whether" nor "indeed" work very well in many contexts. It
: >: seems to me that testing trueness exists in so many contexts that it's
: >: going to be hard to find an English word that fits all the important
: >: ones.
: >
: >Most of those contexts are implicitly boolean, and this function would
: >be redundant there.  The main use for this function is to provide a
: >boolean context for its argument and return 0 or 1 when you really
: >do want 0 or 1 for some context that isn't directly boolean.  This
: >is actually relatively rare.
: >
: >
: Doesn't  C< +?(...) > take care of those cases?
:
: Sure, it's line noise, but do we really need a new keyword for something
: that's "relatively rare"?
: Especially when that keyword is likely to confuse people a lot more than
: the application of two unary operators?

Well, sure, but by a similar argument we don't need "not", "and", or
"or" either.  I think an acknowledgement of its rarity could show up
in making it something relatively long like "whether".  On the other
hand, I have a linguistic problem with "whether" in that in English
it seems to be looser than "and", and "or", while as a "positive not"
in Perl, it would be classified as tighter.  That is,

    $x = whether $a or $b;
    $x = not $a or $b;

would actually be parsed as

    $x = whether($a) or $b;
    $x = not($a) or $b;

whereas as a native English speaker would probably expect

    $x = whether($a or $b);

So I'm thinking we'll just go back to "true", both for that reason,
and because it does syntactically block the naughty meaning of true as
a term (as long as we don't default true() to $_), as Luke reminded us.

Larry


 
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.
John Macdonald  
View profile  
 More options Mar 16 2005, 5:48 pm
Newsgroups: perl.perl6.language
From: j...@perlwolf.com (John Macdonald)
Date: Wed, 16 Mar 2005 17:48:16 -0500
Local: Wed, Mar 16 2005 5:48 pm
Subject: Re: s/true/better name/
On Wednesday 16 March 2005 15:40, Autrijus Tang wrote:

> On Wed, Mar 16, 2005 at 12:09:40PM -0800, Larry Wall wrote:
> > So I'm thinking we'll just go back to "true", both for that reason,
> > and because it does syntactically block the naughty meaning of true as
> > a term (as long as we don't default true() to $_), as Luke reminded us.

> But "true()" reads weird, and it does not read like an unary (or list)
> operator at all to me. As the bikeshedding is still going on, may I
> suggest "aye()"?  It is the same length as "not()", both are adverbs,
> and is rare enough to not conflict with user-defined subs.

A shotgun brainstorming of possible operator names:

determine
ponder
query
consider
examine
veracity
inquire
bool
boolean
bin
binary
propriety


 
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.
Rod Adams  
View profile  
 More options Mar 17 2005, 1:12 am
Newsgroups: perl.perl6.language
From: r...@rodadams.net (Rod Adams)
Date: Thu, 17 Mar 2005 00:12:57 -0600
Local: Thurs, Mar 17 2005 1:12 am
Subject: Re: s/true/better name/

Well, "and" and "or" serve the purpose of being at a much lower
precedence level than "&&" and "||".

I would see the value in alphabetic "not" as serving the same relation
to "!". But I would still see it returning a Bool, not a numified 0 or
1. I could see a "boolean" operator serving the same relation to "?".

But for those cases where someone absolutely has to have a 1 or 0, not
some Boolean object, sticking a  "+"  or "int" in front of a "!", "?",
"not", or "boolean" seems to cover that case fine.

You're going to have that problem with any word you come up with, given
"and" and "or"'s  relationship with assignment. Unless you make the word
magically alter the operator precedence table for any statement it's a
part of...

Which could happen if you make it a macro that adds some strategic
parens for the user. But that jumps way over the "least surprise" line....

>So I'm thinking we'll just go back to "true", both for that reason,
>and because it does syntactically block the naughty meaning of true as
>a term (as long as we don't default true() to $_), as Luke reminded us.

Wouldn't a warning cover that?

-- Rod Adams


 
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.
Thomas Sandlaß  
View profile  
 More options Mar 17 2005, 3:26 am
Newsgroups: perl.perl6.language
From: Thomas.Sandl...@orthogon.com (Thomas Sandlaß)
Date: Thu, 17 Mar 2005 09:26:49 +0100
Local: Thurs, Mar 17 2005 3:26 am
Subject: Re: s/true/better name/

Larry Wall wrote:
>     $x = whether $a or $b;
>     $x = not $a or $b;

> would actually be parsed as

>     $x = whether($a) or $b;
>     $x = not($a) or $b;

> whereas as a native English speaker would probably expect

>     $x = whether($a or $b);

Reading this makes me wanting:

$x =  either $a  or $b;
$y = neither $a nor $b;

And of course binary \ and \\ for the latter :)

> So I'm thinking we'll just go back to "true", both for that reason,
> and because it does syntactically block the naughty meaning of true as
> a term (as long as we don't default true() to $_), as Luke reminded us.

What is so bad of having a proper type bool?  I mean one that gives
a type error or warning for 'answer() == true' if &answer returns Int
because bool { not .does Comparable }?  This type would be rather
lightweight, compile time only with representation bit.  The .bit
property would then actually become a call of 'as bool'.

Regards,
--
TSa (Thomas Sandlaß)


 
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.
Aldo Calpini  
View profile  
 More options Mar 17 2005, 2:27 pm
Newsgroups: perl.perl6.language
From: d...@perl.it (Aldo Calpini)
Date: Thu, 17 Mar 2005 20:27:24 +0100
Local: Thurs, Mar 17 2005 2:27 pm
Subject: Re: s/true/better name/

John Macdonald wrote:
> A shotgun brainstorming of possible operator names:

well, I didn't follow this thread very closely (and I don't know if it
is "officially" closed :-) but I suddenly thought about "yes". what about:

   $x = not $a or $b; # vs
   $x = yes $a or $b;

   $yesno = yes any(@foo) == any(@bar);

may not be gramatically correct English, but isn't it intuitive enough?

cheers,
Aldo


 
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.
Brian Ingerson  
View profile  
 More options Mar 17 2005, 2:57 pm
Newsgroups: perl.perl6.language
From: i...@ttul.org (Brian Ingerson)
Date: Thu, 17 Mar 2005 11:57:20 -0800
Local: Thurs, Mar 17 2005 2:57 pm
Subject: Re: s/true/better name/
On 17/03/05 04:40 +0800, Autrijus Tang wrote:

> On Wed, Mar 16, 2005 at 12:09:40PM -0800, Larry Wall wrote:
> > whereas as a native English speaker would probably expect

> >     $x = whether($a or $b);

> > So I'm thinking we'll just go back to "true", both for that reason,
> > and because it does syntactically block the naughty meaning of true as
> > a term (as long as we don't default true() to $_), as Luke reminded us.

> But "true()" reads weird, and it does not read like an unary (or list)
> operator at all to me. As the bikeshedding is still going on, may I
> suggest "aye()"?  It is the same length as "not()", both are adverbs,
> and is rare enough to not conflict with user-defined subs.

'Tis a pity nobody suggested `tis()`.

Cheers, Brian


 
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.
Messages 1 - 25 of 28   Newer >
« Back to Discussions « Newer topic     Older topic »