Re: Sane (less insane) pair semantics

2005-10-10 Thread Stuart Cook
(It seems you're confused about my position because I was sloppy presenting it. My apologies; hopefully this will clear a few things up.) On 10/10/05, Uri Guttman [EMAIL PROTECTED] wrote: Stuart Cook [EMAIL PROTECTED] writes: The think I don't like about `foo( *$bar )` is that it's not clear

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 chash/c 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 say

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 arg list

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 to be

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

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

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 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 named

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

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, though. Maybe

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 get those

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 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 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 = 23);

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 it assigns a

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 thing: shuck the array

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 shouldn't be

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

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. Please

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 infix and

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 this operator to

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 be

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 not. In

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-

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 http://www.perl.com/ This week in perl6-compiler PGE error on failing subrules Allison broke the resounding silence of the

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 same, and

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