Re: NaN semantics

2001-10-09 Thread Damian Conway
Tim suggested: > How about punting by using nan (all lowercase) > as a boolean logic not-a-number, leaving NaN > for someone to (later) create an IEEE style > tristate not-a-number. Err, I think not. Having C and C that differ so markedly in behaviour is probably a Recipe For Disast

Re: NaN semantics

2001-10-09 Thread Damian Conway
Tim suggested: > I *like* the proposed Perl6 semantics; it's DWIMier. The problem is > just the name collision. Why not 'inval' (for invalid), or some > such (badval?). This would preserve NaN in its IEEE sense for the > numerical algorithm crew to use. And thus we circle back towa

RE: NaN semantics

2001-10-09 Thread Damian Conway
Dave observed: > > but I still have immense difficulty with the notion that: > > > > $x == NaN > > > > doesn't return true if $x contains NaN. > > Anyone with a hardware background should have no difficulty with > this concept. Yep. You, me, and the (comparati

Re: NaN semantics

2001-10-09 Thread Damian Conway
Nicholas wrote: > I had a think about this a few days ago. I can't see how to do fractions > in Roman Numerals. Take a look at how Lingua::Romana::Perligata (and, incidentally, the ancient Romans) did it. Damianus

RE: General Feelings on Apoc 3

2001-10-09 Thread Damian Conway
Brent asked: > If we have 'and', 'or' and 'xor', can we have 'dor' (defined or) to be a > low-precedence version of this? I actually suggested exactly that to Larry a few weeks back. He likes the idea, but is having trouble finding an acceptable name for the operator. Damian

Re: Just a thought...

2001-10-09 Thread Piers Cawley
Bart Lateur <[EMAIL PROTECTED]> writes: > On 09 Oct 2001 11:22:02 +0100, Piers Cawley wrote: > > >Does the change from ?: to ??:: mean that we can have '?' as a valid > >character in an identifier? > > I'm sure it won't be. The reasoning for replacing "?" with "??" is that > "?" is worth too m

Re: Just a thought...

2001-10-09 Thread Piers Cawley
Michael G Schwern <[EMAIL PROTECTED]> writes: > On Tue, Oct 09, 2001 at 11:22:02AM +0100, Piers Cawley wrote: > > Does the change from ?: to ??:: mean that we can have '?' as a valid > > character in an identifier? I quite like the ruby/scheme idiom of > > having boolean methods ending in a quest

Re: Just a thought...

2001-10-09 Thread Bart Lateur
On 09 Oct 2001 11:22:02 +0100, Piers Cawley wrote: >Does the change from ?: to ??:: mean that we can have '?' as a valid >character in an identifier? I'm sure it won't be. The reasoning for replacing "?" with "??" is that "?" is worth too much as a single character symbol, to sacrifice it on su

Re: string representations

2001-10-09 Thread Aaron Sherman
On Tue, Oct 09, 2001 at 03:13:22PM -0500, Jonathan Scott Duff wrote: > the following would be equivalent: > > $a = "foo\r\n"; > print $a; > print _$a; > print eval(repr($a)); > > That's probably a poor example of its utility, but I'm not as well > versed i

Re: Just a thought...

2001-10-09 Thread Aaron Sherman
On Tue, Oct 09, 2001 at 04:18:31PM -0400, Michael G Schwern wrote: > On Tue, Oct 09, 2001 at 11:22:02AM +0100, Piers Cawley wrote: > > Does the change from ?: to ??:: mean that we can have '?' as a valid > > character in an identifier? I quite like the ruby/scheme idiom of > > having boolean metho

Re: Just a thought...

2001-10-09 Thread Michael G Schwern
On Tue, Oct 09, 2001 at 11:22:02AM +0100, Piers Cawley wrote: > Does the change from ?: to ??:: mean that we can have '?' as a valid > character in an identifier? I quite like the ruby/scheme idiom of > having boolean methods ending in a question mark. eg: > > sub is_visible? {...} I was gon

string representations

2001-10-09 Thread Jonathan Scott Duff
In Python there are two string representations for objects: the canonical representation repr() and the normal (human readable) string representation str(). Would we want this dichotomy in perl 6 as well? The main difference between the two is that strings returned from repr() are directly evalab

Re: NaN semantics

2001-10-09 Thread Me
A quarter-baked idea: How about punting by using nan (all lowercase) as a boolean logic not-a-number, leaving NaN for someone to (later) create an IEEE style tristate not-a-number. Later: $foo == NaN; # NaN literal is not same as nan literal use NaN; NaN(expr);

Re: General Feelings on Apoc 3

2001-10-09 Thread Aaron Sherman
On Tue, Oct 09, 2001 at 11:49:15AM -0700, Tim Conrow wrote: > Brent Dax wrote: > > > > If we have 'and', 'or' and 'xor', can we have 'dor' (defined or) to be a > > low-precedence version of this? > > Oh man. If we've gone so far as 'dor', why not make it 'doh' :-) > > print stomach_state @beer,

Re: General Feelings on Apoc 3

2001-10-09 Thread Tim Conrow
Brent Dax wrote: > > If we have 'and', 'or' and 'xor', can we have 'dor' (defined or) to be a > low-precedence version of this? Oh man. If we've gone so far as 'dor', why not make it 'doh' :-) print stomach_state @beer,@donuts doh "burp!!!" -- -- Tim Conrow [EMAIL PROTECTED]

Re: NaN semantics

2001-10-09 Thread Tim Conrow
Damian Conway wrote: > > Sigh. I *do* see your point of view (Laziness), but I still have immense > difficulty with the notion that: > > $x == NaN > > doesn't return true if $x contains NaN. I *like* the proposed Perl6 semantics; it's DWIMier. The problem is just the name collision. Wh

RE: NaN semantics

2001-10-09 Thread David Whipp
Damian Conway wrote: > but I still have immense difficulty with the notion that: > > $x == NaN > > doesn't return true if $x contains NaN. Anyone with a hardware background should have no difficulty with this concept. All common HDLs have multi-valued logic systems, including values li

Re: General Feelings on Apoc 3

2001-10-09 Thread Aaron Sherman
On Tue, Oct 09, 2001 at 08:35:10AM -0700, Brent Dax wrote: > Bart Lateur: > # On Thu, 4 Oct 2001 03:22:55 -0400, Michael G Schwern wrote: > # > # >Binary // > # > > # >The analogy to || is probably a bit too clever. My first reaction > # >was it's some sort of weird division operator. But it's s

RE: NaN semantics

2001-10-09 Thread Dan Sugalski
At 08:37 AM 10/9/2001 -0700, Brent Dax wrote: >Jonathan Scott Duff ># On Tue, Oct 09, 2001 at 10:17:26AM -0400, Dan Sugalski wrote: ># > Depending on what Larry's planning, we may weld in support ># for imaginary ># > numbers. While they're mind-warping, in some ways they're ># better than ># > ha

RE: NaN semantics

2001-10-09 Thread Brent Dax
Jonathan Scott Duff # On Tue, Oct 09, 2001 at 10:17:26AM -0400, Dan Sugalski wrote: # > Depending on what Larry's planning, we may weld in support # for imaginary # > numbers. While they're mind-warping, in some ways they're # better than # > having a line labeled "Beyond here be dragons" or somet

RE: General Feelings on Apoc 3

2001-10-09 Thread Brent Dax
Bart Lateur: # On Thu, 4 Oct 2001 03:22:55 -0400, Michael G Schwern wrote: # # >Binary // # > # >The analogy to || is probably a bit too clever. My first reaction # >was it's some sort of weird division operator. But it's servicable. # # I think it's very cute. I think of it as a "skewed or", wh

Re: NaN semantics

2001-10-09 Thread Dan Sugalski
At 09:33 AM 10/9/2001 -0500, Jonathan Scott Duff wrote: >On Tue, Oct 09, 2001 at 10:17:26AM -0400, Dan Sugalski wrote: > > Depending on what Larry's planning, we may weld in support for imaginary > > numbers. While they're mind-warping, in some ways they're better than > > having a line labeled "B

Re: NaN semantics

2001-10-09 Thread Jonathan Scott Duff
On Tue, Oct 09, 2001 at 10:17:26AM -0400, Dan Sugalski wrote: > Depending on what Larry's planning, we may weld in support for imaginary > numbers. While they're mind-warping, in some ways they're better than > having a line labeled "Beyond here be dragons" or something. Neat. It'd be nice to h

RE: NaN semantics

2001-10-09 Thread Dan Sugalski
At 05:29 AM 10/9/2001 -0500, [EMAIL PROTECTED] wrote: >Piers Cawley [mailto:[EMAIL PROTECTED]] on 9 October 2001 09:02 wrote: > > But there are going to be problems in some cases if we change the > > behaviour of NaN to the perl semantics. There are cases where the IEEE > > behaviour is *useful* d

Re: NaN semantics

2001-10-09 Thread Randal L. Schwartz
> "Damian" == Damian Conway <[EMAIL PROTECTED]> writes: Damian> Sigh. I *do* see your point of view (Laziness), but I still have immense Damian> difficulty with the notion that: Damian> $x == NaN Damian> doesn't return true if $x contains NaN. Just think of it as a quantum number t

Re: NaN semantics

2001-10-09 Thread Graham Barr
On Tue, Oct 09, 2001 at 04:39:47PM +1000, Damian Conway wrote: > Sigh. I *do* see your point of view (Laziness), but I still have immense > difficulty with the notion that: > > $x == NaN > > doesn't return true if $x contains NaN. I agree. The difficulty I have is that it is the compari

Re: General Feelings on Apoc 3

2001-10-09 Thread Bart Lateur
On Thu, 4 Oct 2001 03:22:55 -0400, Michael G Schwern wrote: >Binary // > >The analogy to || is probably a bit too clever. My first reaction >was it's some sort of weird division operator. But it's servicable. I think it's very cute. I think of it as a "skewed or", which is, er, both what it bo

RE: NaN semantics

2001-10-09 Thread Richard_Cox
Piers Cawley [mailto:[EMAIL PROTECTED]] on 9 October 2001 09:02 wrote: > But there are going to be problems in some cases if we change the > behaviour of NaN to the perl semantics. There are cases where the IEEE > behaviour is *useful* dammit. Indeed, we certainly don't want sqrt(-1) == sqrt(-2)

Just a thought...

2001-10-09 Thread Piers Cawley
Does the change from ?: to ??:: mean that we can have '?' as a valid character in an identifier? I quite like the ruby/scheme idiom of having boolean methods ending in a question mark. eg: sub is_visible? {...} Of course, I'm not going to be even vaguely upset if this is still not allowed, b

Apocalypse

2001-10-09 Thread Alberto Manuel Brandao Simoes
Hi! Is there any possibility to discuss operators from apocalypse 3? Here goes my thoughts: 1) ?: operator is very common to C programmers and should not be changed to ??::. I agree that the ':' can be usefull out there, but, if we change ?: to ()?

Re: From the "Be Afraid. Be Very Afraid" department.

2001-10-09 Thread Damian Conway
> If we only could distil Larry's and Damian's neurons and convert > that into C :-) It's simple. Once the design is complete you simply chop us up and feed us to Dan and Simon. ;-) Damian

Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Damian Conway
> Please tell me there will be a way to work out if you're called as a > subroutine or as a method. Yes. Subroutines and methods will inhabit different namespaces (modules and classes respectively): module X; sub s { print "I am the very model of a modern Perl 6 subroutine

Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > >> And package::subroutine should go the way of package`subroutine > as > >> package.subroutine will work and become the preferred method :), > no? > > > Err...no. They're still not the same thing in Perl 6: > > package::subroutine(

Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Damian Conway
> So a class method and a plain function call are still not the same > thing? Correct. Damian

Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Bart Lateur
On Thu, 4 Oct 2001 14:33:54 +1000 (EST), Damian Conway wrote: >To: [EMAIL PROTECTED] >Subject: Re: A3, the ';' operator, and hyper-operators >From: Damian Conway <[EMAIL PROTECTED]> >Date: Thu, 4 Oct 2001 14:33:54 +1000 (EST) > > > > And package::subroutine should go the way of package`subrout

Re: A3, the ';' operator, and hyper-operators

2001-10-09 Thread Bart Lateur
On Fri, 5 Oct 2001 06:00:07 +1000 (EST), Damian Conway wrote: > > $foo + $bar > > > > will call $foo's overloaded add if it has one no matter where $foo's used. > >Sorry. I should have been clearer. > >Dan is, of course, correct. Overloaded operators that are class methods >will tag al

Re: NaN semantics

2001-10-09 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > >> But I assume that == means numerically equal (and here I could be > >> wrong). If what I assume is true however, then anything which > doesn't > >> have any numerical meaning, numerically compared to anything > (even to > >> itse

Re: Thoughts on ap3

2001-10-09 Thread Damian Conway
> Well, sure, but that's precisely what the C operator was intended > to do in the first place. I don't know why Damian used a dot there. > I'd also expect that construct to return the old value of irs. The > dot snuck into the last draft of E3 and I didn't read it with enough of