Re: Class Methods, Eigenclasses and $?CLASS

2005-10-10 Thread Stevan Little
Luke, On Oct 10, 2005, at 7:47 PM, Luke Palmer wrote: How do you explain this: class Foo { method bar (Class $class:) { "class method" } } say Foo.bar;# class method my $foo = Foo.new; say $foo.bar; # class method Assuming that that is valid Perl. It

Re: Class Methods, Eigenclasses and $?CLASS

2005-10-10 Thread Luke Palmer
On 10/10/05, Stevan Little <[EMAIL PROTECTED]> wrote: > ::Class > ^ > : <-- eFoo is a subclass of Class > : > ::eFoo # eFoo is also an instance of Class > | > | <-- eFoo is the class of Foo > V >::Foo > > The dispatching of instance methods is still the sam

This week's summary

2005-10-10 Thread The Perl 6 Summarizer
The Perl 6 Summary for the week ending 2005-10-09 Hello, and welcome to the first Perl 6 Summary to be published on my website rather than its former home at This week in perl6-compiler PGE error on failing subrules Allison broke the resounding silence of the l

Class Methods, Eigenclasses and $?CLASS

2005-10-10 Thread Stevan Little
Evening all, So I am in the process of adding class-methods into the meta-model using eigenclasses. Eigenclasses are a ruby thing (and also a CLOS thing IIRC), in which an anon-class is inserted between an instance and it's class, essentially replacing the instance's class. The anon- class

Re: Roles and Trust

2005-10-10 Thread Piers Cawley
Ovid <[EMAIL PROTECTED]> writes: > Apocalypse 12 has the following to say about roles and trust > (http://www.perl.com/pub/a/2004/04/16/a12.html?page=10) > > It's not clear whether roles should be allowed to grant > trust. In the absence of evidence to the contrary, I'm > inclined to say no

Re: Sane (less insane) pair semantics

2005-10-10 Thread Ingo Blechschmidt
Hi, Juerd wrote: > Ingo Blechschmidt skribis 2005-10-10 20:08 (+0200): >> Named arguments can -- under the proposal -- only ever exist in >> calls. > > Which leaves us with no basic datastructure that can hold both > positional and named arguments. This is a problem because in a call, > they can

Re: Sane (less insane) pair semantics

2005-10-10 Thread Uri Guttman
> "J" == Juerd <[EMAIL PROTECTED]> writes: J> Ingo Blechschmidt skribis 2005-10-10 19:59 (+0200): >> my @args = ( (a => 1), b => 2 ); # is sugar for >> my @args = ( (a => 1), (b => 2) ); J> Please, no. Please let the pair constructor be =>, not (=>). There is J> really no need for

Re: Sane (less insane) pair semantics

2005-10-10 Thread Ingo Blechschmidt
Hi, Juerd wrote: > Ingo Blechschmidt skribis 2005-10-10 19:59 (+0200): >> my @args = ( (a => 1), b => 2 ); # is sugar for >> my @args = ( (a => 1), (b => 2) ); > > Please, no. Please let the pair constructor be =>, not (=>). There is > really no need for this operator to consist of both

Re: Sane (less insane) pair semantics

2005-10-10 Thread Juerd
Ingo Blechschmidt skribis 2005-10-10 19:59 (+0200): > my @args = ( (a => 1), b => 2 ); # is sugar for > my @args = ( (a => 1), (b => 2) ); Please, no. Please let the pair constructor be =>, not (=>). There is really no need for this operator to consist of both infix and circumfix parts. P

Re: Sane (less insane) pair semantics

2005-10-10 Thread Juerd
Ingo Blechschmidt skribis 2005-10-10 20:08 (+0200): > Named arguments can -- under the proposal -- only ever exist in calls. Which leaves us with no basic datastructure that can hold both positional and named arguments. This is a problem because in a call, they can be combined. An array could hol

Re: Sane (less insane) pair semantics

2005-10-10 Thread Ingo Blechschmidt
Hi, Juerd wrote: > Ingo Blechschmidt skribis 2005-10-10 19:36 (+0200): >> my @array = (42, "hi", (a => 23)); > > It is worth pointing out that the inner parens here are merely for > grouping: this information is lost afterwards, hence this: > >> foo [EMAIL PROTECTED]; # same as > > sho

Re: Sane (less insane) pair semantics

2005-10-10 Thread Ingo Blechschmidt
Hi, Dave Whipp wrote: > Austin Hastings wrote: >> How about "perl should DWIM"? In this case, I'm with Juerd: splat >> should pretend that my array is a series of args. >> >> So if I say: >> >> foo [EMAIL PROTECTED]; >> >> or if I say: >> >> foo([EMAIL PROTECTED]); >> >> I still mean the same

Re: Sane (less insane) pair semantics

2005-10-10 Thread Ingo Blechschmidt
Hi, Mark Reed wrote: > On 2005-10-10 13:36, "Ingo Blechschmidt" <[EMAIL PROTECTED]> wrote: >> Under the proposal, a Pair object doesn't have any special >> magic > > Right. So under this proposal, the "key => value" syntax is > overloaded: in some contexts it creates a Pair object, and in others

Re: Sane (less insane) pair semantics

2005-10-10 Thread Juerd
Ingo Blechschmidt skribis 2005-10-10 19:36 (+0200): > my @array = (42, "hi", (a => 23)); It is worth pointing out that the inner parens here are merely for grouping: this information is lost afterwards, hence this: > foo [EMAIL PROTECTED]; # same as shouldn't be > foo 42, "hi", (a

Re: Sane (less insane) pair semantics

2005-10-10 Thread Mark Reed
On 2005-10-10 13:36, "Ingo Blechschmidt" <[EMAIL PROTECTED]> wrote: > Under the proposal, a Pair object doesn't have any special > magic Right. So under this proposal, the "key => value" syntax is overloaded: in some contexts it creates a Pair object, and in others it assigns a value to a named

Re: Sane (less insane) pair semantics

2005-10-10 Thread Dave Whipp
Austin Hastings wrote: How about "perl should DWIM"? In this case, I'm with Juerd: splat should pretend that my array is a series of args. So if I say: foo [EMAIL PROTECTED]; or if I say: foo([EMAIL PROTECTED]); I still mean the same thing: shuck the array and get those args out here, even

Re: Sane (less insane) pair semantics

2005-10-10 Thread Ingo Blechschmidt
Hi, Austin Hastings wrote: > How about "perl should DWIM"? In this case, I'm with Juerd: splat > should pretend that my array is a series of args. Yep. > So if I say: > > foo [EMAIL PROTECTED]; > > or if I say: > > foo([EMAIL PROTECTED]); > > I still mean the same thing: shuck the array and

Re: Sane (less insane) pair semantics

2005-10-10 Thread Austin Hastings
Miroslav Silovic wrote: > [EMAIL PROTECTED] wrote: > >> * expands its RHS and evaluate it as if it was written literally. >> >> I'd like @_ or @?ARGS or something like that to be a *-able array that >> will be guaranteed to be compatible with the current sub's signature. >> > This sounds nice, tho

Re: Type annotations

2005-10-10 Thread TSa
HaloO, I fear I'm addicted... Luke Palmer wrote: On 10/7/05, chromatic <[EMAIL PROTECTED]> wrote: On Fri, 2005-10-07 at 17:43 -0600, Luke Palmer wrote: No, you can't overload assignment at runtime because you can't overload assigment at any time, so says the language spec (well, not any fo

Re: Sane (less insane) pair semantics

2005-10-10 Thread Austin Hastings
Stuart Cook wrote: >On 10/10/05, Austin Hastings <[EMAIL PROTECTED]> wrote: > > >The overrides have nothing to do with it. That a=>1 will *always* be a >positional, because by the time it reaches the argument list, it's a value >(not a syntactic form). The only way to use a pair-value as a n

Re: Sane (less insane) pair semantics

2005-10-10 Thread Larry Wall
Interestingly, I had already written almost exactly the same thing into my version of S06, but I've been holding off on checking it in while I mull over Luke's theory theory. Regardless of the actual syntax we end up with, I think everyone can assume that the compiler will be able to determine at

Re: Sane (less insane) pair semantics

2005-10-10 Thread Miroslav Silovic
[EMAIL PROTECTED] wrote: Stuart Cook skribis 2005-10-10 22:58 (+1100): @args = (a => 1, get_overrides()); foo([EMAIL PROTECTED]); Not if you want that a=>1 to be a named argument. Under the proposal, the only ways to pass a named argument are: 1) By using a literal pair in the synt

Re: Sane (less insane) pair semantics

2005-10-10 Thread Juerd
Juerd skribis 2005-10-10 15:20 (+0200): > only pairs on the topmost level of arguments (not in any parens) are s/not in any parens/not in any grouping parens/, to exclude .() Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/g

Re: Sane (less insane) pair semantics

2005-10-10 Thread Juerd
Miroslav Silovic skribis 2005-10-10 15:04 (+0200): > >>Under the proposal, the only ways to pass a named argument are: > >>1) By using a literal pair in the syntactic top-level of the arg list > >>2) By splatting a pair, hash, or arg-list-object > >I find this counterintuitive, and also want arrays

Re: Sane (less insane) pair semantics

2005-10-10 Thread Juerd
Stuart Cook skribis 2005-10-10 22:58 (+1100): > > @args = (a => 1, get_overrides()); > > foo([EMAIL PROTECTED]); > Not if you want that a=>1 to be a named argument. > Under the proposal, the only ways to pass a named argument are: > 1) By using a literal pair in the syntactic top-level of the a

Re: Sane (less insane) pair semantics

2005-10-10 Thread Stuart Cook
On 10/10/05, Austin Hastings <[EMAIL PROTECTED]> wrote: > So to pass a hash that has one element requires using the hash > keyword? I don't see a hash in your example, so I'm not sure what you're referring to here. > Specifically, if I say: > > @args = (a => 1, get_overrides()); > > Then can I