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
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
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
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
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
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
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
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
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
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
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
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
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);
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,
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]
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
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
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
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
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
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
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
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
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
> "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
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
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
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)
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
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 ()?
> 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
> 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
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(
> So a class method and a plain function call are still not the same
> thing?
Correct.
Damian
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
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
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
> 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
38 matches
Mail list logo