Re: Demagicalizing pairs

2005-08-23 Thread Damian Conway
Larry wrote: Plus I still think it's a really bad idea to allow intermixing of positionals and named. We could allow named at the beginning or end but still keep a constraint that all positionals must occur together in one zone. If losing the magic from =>'d pairs isn't buying us named args w

Re: ~ and + vs. generic eq

2005-08-23 Thread Larry Wall
On Wed, Aug 24, 2005 at 12:43:46AM +0300, Yuval Kogman wrote: : On Tue, Aug 23, 2005 at 10:28:01 -0700, Larry Wall wrote: : > On Tue, Aug 23, 2005 at 06:19:33PM +0300, Yuval Kogman wrote: : > : "10" == "10"; # dispatches to Str, due to better match : > : > Nope, that will continue to coerce to n

Re: ~ and + vs. generic eq

2005-08-23 Thread Yuval Kogman
On Tue, Aug 23, 2005 at 10:28:01 -0700, Larry Wall wrote: > On Tue, Aug 23, 2005 at 06:19:33PM +0300, Yuval Kogman wrote: > : "10" == "10"; # dispatches to Str, due to better match > > Nope, that will continue to coerce to numeric comparison. The design > team did in fact consider pure "equiv

Re: Can a scalar be "lazy" ?

2005-08-23 Thread Yuval Kogman
On Tue, Aug 23, 2005 at 10:56:08 -0700, Larry Wall wrote: > We could probably extend "is cached" to attributes (and their implied > accessors) if lazy blocks aren't sufficient. Hmm... With the whole distinction of &foo as a value and &foo() as a application of the value, maybe we can sometimes as

Re: Can a scalar be "lazy" ?

2005-08-23 Thread Larry Wall
On Tue, Aug 23, 2005 at 11:03:52AM +0300, Yuval Kogman wrote: : On Mon, Aug 22, 2005 at 13:25:57 -0700, Larry Wall wrote: : > On Tue, Aug 23, 2005 at 04:09:29AM +0800, Yiyi Hu wrote: : > : my( $s, $t ); $s = "value t is $t"; $t = "xyz"; print $s; : > : in perl 5, it will give a warning, and won't d

Re: ~ and + vs. generic eq

2005-08-23 Thread Larry Wall
On Tue, Aug 23, 2005 at 06:19:33PM +0300, Yuval Kogman wrote: : "10" == "10"; # dispatches to Str, due to better match Nope, that will continue to coerce to numeric comparison. The design team did in fact consider pure "equivalence" MMD dispatch of == in the last meeting, but rejected it in

Re: Calling positionals by name in presence of a slurpy hash

2005-08-23 Thread Larry Wall
On Tue, Aug 23, 2005 at 09:11:15AM -0600, Luke Palmer wrote: : On 8/23/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: : > Hi, : > : > (asking because a test testing for the converse was just checked in to : > the Pugs repository [1]) : > : > sub foo ($n, *%rest) {...} : > : > foo 13; :

Re: ~ and + vs. generic eq

2005-08-23 Thread Yuval Kogman
On Tue, Aug 23, 2005 at 18:15:07 +0200, Ingo Blechschmidt wrote: > sorry, I've some problems with this proposal: > > == has always meant numeric equality in Perl and I'd like it to stay > that way. For "simple" values like numbers and strings == is numberic, because it's affinity to it. > > "10

Re: ~ and + vs. generic eq

2005-08-23 Thread Ingo Blechschmidt
Hi, Yuval Kogman wrote: > I think this is more consistent, and just as useful: > > 10 == 10; # dispatches to num > "10" == 10; # dispatched to Num, by means of coercion (== has some > affinity to it for backwards compatibility) "10" == "10"; # dispatches > to Str, due to better match "10.0" == "1

~ and + vs. generic eq

2005-08-23 Thread Yuval Kogman
I don't like eqv, because it's ugly, inconsistent with anything else in Perl 6, especially &&, ||, and ^^. It might be forced to fit into the and, or, and xor family, but you'd expect to find 'eq' there, and that's not what it means. IMHO == is as "generic" as && and ||, and is even more like ^^ s

Re: Calling positionals by name in presence of a slurpy hash

2005-08-23 Thread Luke Palmer
On 8/23/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: > Hi, > > (asking because a test testing for the converse was just checked in to > the Pugs repository [1]) > > sub foo ($n, *%rest) {...} > > foo 13; > # $n receives 13, of course, %rest is () > > foo 13, foo => "bar"; >

Calling positionals by name in presence of a slurpy hash

2005-08-23 Thread Ingo Blechschmidt
Hi, (asking because a test testing for the converse was just checked in to the Pugs repository [1]) sub foo ($n, *%rest) {...} foo 13; # $n receives 13, of course, %rest is () foo 13, foo => "bar"; # $n receives 13 again, %rest is (foo => "bar") foo n => 13; # $n re

Re: Perl 6 Summary for 2005-08-15 through 2005-08-22

2005-08-23 Thread Tim Bunce
On Mon, Aug 22, 2005 at 09:43:41PM -0400, Matt Fowles wrote: > >Java on Parrot > Tim Bunce asked some preliminary questions about Java on Parrot. I > provide preliminary answers, and Nattfodd and Autrijus posted links to > related work. The important question of what it should be c

Re: Perl 6 Summary for 2005-08-15 through 2005-08-22

2005-08-23 Thread Leopold Toetsch
On Aug 23, 2005, at 3:43, Matt Fowles wrote: Perl 6 Summary for 2005-08-15 through 2005-08-22 Java on Parrot I vote for "Jot". That's already occupied by another language http://en.wikipedia.org/wiki/Iota_and_Jot. Perl 6 Language Type Inferencing in Perl 5 Autrijus

Re: Can a scalar be "lazy" ?

2005-08-23 Thread Yuval Kogman
On Mon, Aug 22, 2005 at 13:25:57 -0700, Larry Wall wrote: > On Tue, Aug 23, 2005 at 04:09:29AM +0800, Yiyi Hu wrote: > : my( $s, $t ); $s = "value t is $t"; $t = "xyz"; print $s; > : in perl 5, it will give a warning, and won't do "right" thing. > : we have to use other way or eval '$s' before prin