perl6-language@perl.org

2005-09-07 Thread Larry Wall
. Another view is that it's basically turning a normal call into a mutator call of the splice variety. So maybe map is just sub map (&code, [EMAIL PROTECTED]) { gather { take @list.splice(&code); } } or some such. Larry

Re: Proposal: split ternary ?? :: into binary ?? and //

2005-09-07 Thread Larry Wall
sh-speaking bias that requires a "neither" on the front. So let's go ahead and make it ??!!. (At least this week...) Larry

Re: Packages, Modules and Classes

2005-09-07 Thread Larry Wall
of meta-model actions (Foo.meta.change_method(...) or somesuch)? : What if I delete the symbol table entry, what happens then (more : meta-trickery)? No special {FOO} subscripts, so the question doesn't arise. To the symbol table all blocks are stored as Foo<&bar>, presumably with extra canonicalized key info for "long" names. Larry

Re: \(...)?

2005-09-07 Thread Larry Wall
rse* as a list of lvalues. Maybe a siglet can degenerate to that, but there are problems with that approach too. Unless someone can come up with a better proposal, \($a,$b) is the default winner on the basis of prior Perl 5 art. Larry

Re: Packages, Modules and Classes

2005-09-07 Thread Larry Wall
On Wed, Sep 07, 2005 at 08:46:24AM -0700, Larry Wall wrote: : No special {FOO} subscripts, so the question doesn't arise. To the : symbol table all blocks are stored as Foo<&bar>, presumably with : extra canonicalized key info for "long" names. Actually, we might

Re: Packages, Modules and Classes

2005-09-07 Thread Larry Wall
to the old .:baz() accessor), and we presumably take steps to prevent people from breaking any "_" encapsulation trivially. (The debugger needs to get at the info, of course, which basically means anyone can if they pretend to be the debugger, but we don't have to make it easy...) Larry

Re: Packages, Modules and Classes

2005-09-08 Thread Larry Wall
y just MY::{$varname}, and also likely to be confused with ::($sym). So that approach doesn't really buy us much. So let's just try to make the simple Foo<$var> form stick for now, and back off later if forced to. Larry

Re: Parsing indent-sensitive languages

2005-09-08 Thread Larry Wall
this and the previous approach is that you're not relying on the rules engine to keep track of the queueing for you.) The very fact that I had to use a phrase like "positive unindent token" says a lot about why indentation as syntax is problematic in general. Larry

Re: Packages, Modules and Classes

2005-09-08 Thread Larry Wall
27;m trying to get rid of. Larry

Re: Parsing indent-sensitive languages

2005-09-08 Thread Larry Wall
if foo3 bar3 else baz2 Larry

Re: Parsing indent-sensitive languages

2005-09-08 Thread Larry Wall
On Thu, Sep 08, 2005 at 07:57:43PM -0400, Collin Winter wrote: : On 9/8/05, Larry Wall <[EMAIL PROTECTED]> wrote: : > It seems to me you need a stack of levels so you know how many : > indentation levels to pop off. Otherwise you can't parse this: : > : > if foo1 :

Re: \(...)?

2005-09-09 Thread Larry Wall
not require creating new containers -- : : So comma in scalar context creates an array of aliases? That would be a : welcome difference. It might at that. Though doubtless there is a downside I'm not seeing yet... Larry

Re: Packages, Modules and Classes

2005-09-09 Thread Larry Wall
;ve decoupled the stash from *being* the package object by making it an attribute, why don't we say that any ._fnordish things just get stuffed into a *different* stash attribute, and the ::{} can simply return the public stash without having to do any filtering. I think that's a lot cleaner. Larry

Re: Packages, Modules and Classes

2005-09-09 Thread Larry Wall
On Fri, Sep 09, 2005 at 08:46:06AM -0700, Larry Wall wrote: : If these are really postfix operators, then we can also write : : Foo .::{} : Foo .::<> : Foo .::() But I don't think they can really be postfix. At least, ::() isn't, since $Foo .::($bar) would no

Re: \(...)?

2005-09-09 Thread Larry Wall
= ($b,$a) This is how Perl 5 assignment works, and we're trying not to break that... Larry

Re: \(...)?

2005-09-09 Thread Larry Wall
rs: : : 1 < 2 < 3; # is really : &infix:{"<"}(1, 2, 3); : : (This is, as far as I know, not specced. Take it as an report on Pugs's Which is also, of course, what [<] 1,2,3 turns into--unless it just turns directly into bool::true. :-) Larry

Re: Accessing a list literal by key?

2005-09-09 Thread Larry Wall
=> 2, %defaults) That's assuming it's not actually worth building the temp hash, and that you want $a to end up 0 and ignore the 1. Larry

Re: item and slurpy

2005-09-09 Thread Larry Wall
orcing context also "item" and : "slurpy", rather than "scalar" and "list"? It's item and list, I think. Larry

Re: Sequence points, undefined behaviour

2005-09-18 Thread Larry Wall
much as possible. We need a consistent semantics more than we need to squeeze every last ounce of optimization out of the resulting assembly code. Specialized code can do specialized things with pragmas and types, but by default we need to be general whenever we can get away with it. Larry

Re: Sort of "do it once" feature request...

2005-09-26 Thread Larry Wall
that... But yes, even with that desugaring, it does mean you're not writing "pure" code in the functional sense. Larry

Re: Allomopherencing

2005-09-26 Thread Larry Wall
g, but I strongly suspect that most type-inferencing error messages will be complete gibberish to commonfolk. Larry

Re: Exceptuations

2005-09-28 Thread Larry Wall
wn, I don't know.) But this gives us dynamic control over warnings to complement (not replace) the lexical control provided by "use warnings". Larry

perl6-language@perl.org

2005-09-30 Thread Larry Wall
ault is to take the argument as rule, and here we merely have a null "foo". That gives us cool things like s/back \s+ < \d+ > \s+ times/{ $<> + 1 }/ to increment the number of times the quick brown fox jumped over the lazy dog's back. Larry

Re: Sane (less insane) pair semantics

2005-10-10 Thread Larry Wall
tside the scope, where the current scope could even be the current language as a whole. That might alleviate cultural differences if one language always uses $left and $right where another uses x and y, for instance. Of course, I haven't eaten breakfast yet, so maybe that's impossible. Larry

Re: Proposal to make class method non-inheritable

2005-10-11 Thread Larry Wall
ng we abolish class methods entirely, only that : we simplify them. If we do not require that class methods be : inherited, then they can be implemented as ruby-style "singleton- : methods" on the Class instance. This keeps the internals of the meta- : model clean and orderly (always a good thing IMHO :). : : Anyway, I have said my peace, what do you all think? I think there's no such thing as a Class instance. That simplifies things even further. Larry

Re: Complex types

2005-10-12 Thread Larry Wall
On Thu, Oct 13, 2005 at 09:43:15AM +1300, Sam Vilain wrote: : Hi all, : : Is it intentional that S09 lists unboxed complex types, but equivalent : Boxed types are missing from the "Types" section in S06? Nope. Larry

Re: Should roles and classes be merged?

2005-10-14 Thread Larry Wall
e easier to understand with early binding rather than late binding. So another way to view the role/class distinction is that roles have eager semantics while classes have lazy semantics. I expect it's possible to do lazy generics, but I would put it in the category of hard things that should be possible. Do I make myself perfectly muddy? :-) Larry

Re: Translitteration and combining strings and array references

2005-10-14 Thread Larry Wall
gratuitous. Should work with parens too. In fact, it should work with a bare range object on the left: "foobar".trans( 'a' .. 'b' => '12'); # a=>1, b=>2 : Same problem ocurs if left hand side is a string and right hand side : is an array reference but in this case the code implementing trans can : see it. Overzealous => stringification, I think. .trans can use a string as a list by splitting it, but the underlying structures must be lists. Thanks for working on this! Do you know any more people like you? :-) Larry

Re: Re(vised): Proposal to make class method non-inheritable

2005-10-14 Thread Larry Wall
ated objects, just as Routine (or whatever it is these days) is a role that manages partially instantiated sub calls. And they mostly manage by delegation to .meta. Larry

Re: Translitteration and combining strings and array references

2005-10-14 Thread Larry Wall
(And for syntactic named args, a => probably *should* be enforcing string context on the key.) Larry

Re: Translitteration and combining strings and array references

2005-10-14 Thread Larry Wall
On Sat, Oct 15, 2005 at 01:27:58AM +0200, Juerd wrote: : Larry Wall skribis 2005-10-14 10:43 (-0700): : > Actually, it looks like the bug is probably that => is forcing : > stringification on its left argument too agressively. It should only : > do that for an identifier. : : Woul

Re: Re(vised): Proposal to make class method non-inheritable

2005-10-15 Thread Larry Wall
generalization of &func.assuming. That'd be kinda cool. Larry

Re: Re(vised): Proposal to make class method non-inheritable

2005-10-15 Thread Larry Wall
On Sat, Oct 15, 2005 at 07:39:36PM +0300, wolverian wrote: : On Sat, Oct 15, 2005 at 08:25:15AM -0700, Larry Wall wrote: : > [snip] : > : > Of course, there's never been any controversy here about what to call : > "self", oh no... :-) : : IMHO just call it "self&q

Re: syntax for accessing multiple versions of a module

2005-10-19 Thread Larry Wall
Dog-0.0.2-cpan:LWALL : : And the user is now forced to add the cpan id to get Dog-1.2.1. I am : not sure how strict @Larry wants this to be. I think $Larry wants to be strict on this, at least this week. If you're using two different versions explicitly within the same scope, you should pr

Re: Re(vised): Proposal to make class method non-inheritable

2005-10-19 Thread Larry Wall
weird things with scope or duration. * global scope + currently compiling scope ? currently compiled scope = current file/pod scope < current $/ scope ^ current signature scope : make $:foo equivalent to :foo($foo) (conjectural) Larry

Re: Re(vised): Proposal to make class method non-inheritable

2005-10-19 Thread Larry Wall
which could be a : very good thing, by the way) What replaces that? The absence of a dot creates a private attribute. We decided it should be even easier to declare a private attribute than a public one, so it's just has $foo; and then it is visible only in the lexical scope. Larry

Re: syntax for accessing multiple versions of a module

2005-10-19 Thread Larry Wall
On Wed, Oct 19, 2005 at 12:59:34PM +0200, Ruud H.G. van Tol wrote: : Larry Wall: : : > I think using two different versions from the same : > module is going to be relatively rare. : : For dealing with two generations at the same time, like with : conversions: in stead of designing and ap

Re: syntax for accessing multiple versions of a module

2005-10-19 Thread Larry Wall
On Wed, Oct 19, 2005 at 09:33:39AM -0400, Stevan Little wrote: : On Oct 19, 2005, at 4:10 AM, Larry Wall wrote: : >On Tue, Oct 18, 2005 at 07:38:19PM -0400, Stevan Little wrote: : >: Then this is added as "Dog-0.0.2-cpan:LWALL" into the main symbol : >: table. Then once the com

Re: syntax for accessing multiple versions of a module

2005-10-19 Thread Larry Wall
aming authority" open, so that part is still subject to extension, and that's one reason we put the naming authority at the end. We could even add more hypthenated fields if they were deemed to be of universal significance. Larry

Re: Translitteration and combining strings and array references

2005-10-19 Thread Larry Wall
s. And in general people will want to declare these as separate subs unless they have some particular reason for wanting to force evaluation order, which is somewhat suspect in the first place if you're using declared tree types. Larry

Re: syntax for accessing multiple versions of a module

2005-10-19 Thread Larry Wall
On Wed, Oct 19, 2005 at 03:10:13PM -0700, Nate Wiger wrote: : Larry Wall wrote: : >Well, we thought about opening it up like that, but we really kinda : >need to establish what is an official part of the "long name" for : >uniqueness purposes, and try to avoid too muc

Re: subclassing associated classes elegantly

2005-10-19 Thread Larry Wall
class outside the methods, names are not virtual.) Larry

Re: Translitteration and combining strings and array references

2005-10-19 Thread Larry Wall
aram of .trans were called $foo. : Would in the above case +($foo.key) == 2? And I guess the parens : could be dropped because .key binds tighter than prefix:<+>, right? : I mean the type of the key in the pair is an array of compile time : strings. Or is that not preserved? Yes, that should be preserved, seems to me. Larry

Re: syntax for accessing multiple versions of a module

2005-10-20 Thread Larry Wall
he record, I still haven't : figured out what I'm going to do yet. Check Perlmonks for the SOPW in : a few minutes.) We probably need some meta-information somewhere about which names claim to offer the same interface, and which are just accidental collisions. That part isn't terribly well defined yet. Larry

Re: syntax for accessing multiple versions of a module

2005-10-20 Thread Larry Wall
On Wed, Oct 19, 2005 at 03:58:17PM -0700, Nate Wiger wrote: : Larry Wall wrote: : >This is one of those accomodations to the real world, like everyone : >agreeing on a standard URI format. We're really trying to keep : >these module names close to what you'd see as the n

new sigil

2005-10-20 Thread Larry Wall
easons". Instead, the new sigil is the cent sign, so ::T is now written ¢T instead. In addition, it doesn't automatically bind to T like we were making ::T do, so you have to use it consistently: sub sametype (¢T $x, ¢T $y) {...} Within a larger scope, you can always alias, though: ::T := ¢T; Larry

Re: new sigil

2005-10-20 Thread Larry Wall
On Thu, Oct 20, 2005 at 10:21:53AM -0500, Steve Peters wrote: : On Thu, Oct 20, 2005 at 07:56:09AM -0700, Larry Wall wrote: : > I don't know how long this EuroOSCON net is going to stay up, so I'll be : > brief. I think we're having a new "class" sigil. Where w

Re: new sigil

2005-10-20 Thread Larry Wall
ppropriate ugly ASCII workaround for ¢ should be. Larry

Re: new sigil

2005-10-20 Thread Larry Wall
o say ¢T $x where it would be illegal to say $T $x. Larry

Re: new sigil

2005-10-20 Thread Larry Wall
On Thu, Oct 20, 2005 at 05:35:10PM +0200, Juerd wrote: : I'm sure ¢ will have its equivalent too. c| or C| maybe. Larry

Re: new sigil

2005-10-20 Thread Larry Wall
On Thu, Oct 20, 2005 at 08:45:25AM -0700, Larry Wall wrote: : More info. ¢T is a scalar variable just like $T, but enforces a : class view, so you can use it as a class parameter, and pass any : object to it, but only access the classish aspects of the object. And a nice side effect of that is

Re: new sigil

2005-10-20 Thread Larry Wall
On Thu, Oct 20, 2005 at 11:46:30AM -0400, John Siracusa wrote: : On 10/20/05 11:37 AM, Larry Wall wrote: : > On Thu, Oct 20, 2005 at 10:32:14AM -0500, Steve Peters wrote: : > : The idea of punishing programmers who choose to use certain operating system : > : or locales just doesn't

Re: new sigil

2005-10-20 Thread Larry Wall
On Thu, Oct 20, 2005 at 07:56:09AM -0700, Larry Wall wrote: : I don't know how long this EuroOSCON net is going to stay up, so I'll be : brief. I think we're having a new "class" sigil. Where we've been : writing ::T, that will revert to meaning "an existing c

Re: new sigil

2005-10-20 Thread Larry Wall
On Thu, Oct 20, 2005 at 05:53:00PM +0200, Juerd wrote: : Larry Wall skribis 2005-10-20 8:46 (-0700): : > On Thu, Oct 20, 2005 at 05:35:10PM +0200, Juerd wrote: : > : I'm sure ¢ will have its equivalent too. : > c| or C| maybe. : : But : : sub c { ... } : sub d { ... } :

Re: new sigil

2005-10-25 Thread Larry Wall
lock, which is why the second form above applies the existing T to $z rather than capturing the type of $z. But it's a bit like writing &foo() when you could just say foo() instead. Larry

Re: Avoid the Yen Sign [Was: Re: new sigil]

2005-10-25 Thread Larry Wall
t.) Anyway, I think people will be able to distinguish visually between "A ¥ B" and "¥X" as long as we keep the operator/term distinction. Larry

Re: Avoid the Yen Sign [Was: Re: new sigil]

2005-10-25 Thread Larry Wall
00, Rob Kinyon wrote: : Isn't this starting to be the question of why we have the Unicode : operators instead of just functions? Would it be possible to have a : function be infix? At which precedence level? Larry

Re: new sigil

2005-10-25 Thread Larry Wall
t;class" and "sub" are keywords in the, er, class of things that trump mere symbol table entries. Either that, or "class" is merely the name of the metaclass, and you'll get a class collision when you try to redefine it. But I expect "class" is really a declarator of the same status as "sub", at least syntactically. Larry

Re: txt vs OO [was: "Re: Proposal to make class method non-inheritable"]

2005-10-25 Thread Larry Wall
it's right up there. Larry

Re: Pronouns ["Re: $_ defaulting for mutating ops"]

2005-10-25 Thread Larry Wall
for (1..9) -> $n { # ought to be more than enough COMPILING::{"\$_$n"} := COMPILING::("OUTER::" x $n)::<$_>; } } maybe with something to catch the case of too many OUTERs. Larry

Re: S04 default { } bug?

2005-10-25 Thread Larry Wall
x27;s not always obvious what's obvious. Larry

Re: Ways to add behavior

2005-10-25 Thread Larry Wall
ocant, and then the metaclass decides what to do based on the instancehood of $x. Larry

Re: Zip more than two arrays?

2005-10-25 Thread Larry Wall
es only to throw them away immediately. And if we're going to build surreal lists into the language, we should probably use them. Larry

Re: new sigil

2005-10-25 Thread Larry Wall
if it did work, it should be a placeholder variable, not something you see in a signature. Larry

Re: new sigil

2005-10-25 Thread Larry Wall
same type as $x? It's a new T according to the current thinking. Just use T if you want the same one. (But that does force util to be recloned on every entry to foo, I expect.) Larry

Re: new sigil

2005-10-25 Thread Larry Wall
On Tue, Oct 25, 2005 at 11:44:35PM +0200, Juerd wrote: : Larry Wall skribis 2005-10-25 14:35 (-0700): : > On Thu, Oct 20, 2005 at 11:18:14AM -0600, Eric wrote: : > : Actualy i think ^ might be my favorite so far. : > : sub sametype (^T $x, ^T $y) {...} : > I thought that, too, until I

Re: $_ defaulting for mutating ops

2005-10-25 Thread Larry Wall
low patterns that start with '='? And basically I don't think people want to mutate $_ with math operators all that often--and if they do want to, they probably don't. :-) Larry

Re: new sigil

2005-10-25 Thread Larry Wall
On Wed, Oct 26, 2005 at 01:17:10AM +0200, Juerd wrote: : Larry Wall skribis 2005-10-25 15:51 (-0700): : > ^T would still have to be a placeholder variable. : : Which it is, in a way. Though we don't currently allow placeholders in ordinary sigs, or even in conjunction with ordin

Re: txt vs OO [was: "Re: Proposal to make class method non-inheritable"]

2005-10-26 Thread Larry Wall
On Wed, Oct 26, 2005 at 09:36:48AM +0200, Michele Dondi wrote: : On Tue, 25 Oct 2005, Larry Wall wrote: : : >But we're trying to design the OO features (indeed, all of Perl 6) : >such that you can usefully cargo cult those aspects that are of : >immediate interest without being f

+$arg changed to :$arg

2005-10-26 Thread Larry Wall
more tightly to the immediately foregoing thing anyway. Like placeholder syntax, indirect object syntax is really only for simple cases. Er, looks like I have to revise S6 yet again... Larry

Re: new sigil

2005-10-26 Thread Larry Wall
Cat) and .does(Fish) and .does(Class) and ¢T := $dc.class and .does(Scalar) and $dc := $_; } ) And basically, if | can be used to construct type sets, it ends up meaning exactly the same thing: :(Any|Dog|Cat|Fish ¢T $dc) But maybe that just means we don't need it. Larry

Re: +$arg changed to :$arg

2005-10-26 Thread Larry Wall
On Wed, Oct 26, 2005 at 10:06:25AM -0400, Matt Fowles wrote: : Larry~ : : On 10/26/05, Larry Wall <[EMAIL PROTECTED]> wrote: : > So we'd get: : > : > :@array[42] 42 => @array[1] : : Do you mean C< :@array[42] 42 => @array[42] >? Yes. I was changing it

Re: +$arg changed to :$arg

2005-10-26 Thread Larry Wall
On Wed, Oct 26, 2005 at 04:02:06PM +0200, Juerd wrote: : Larry Wall skribis 2005-10-26 6:44 (-0700): : > I should point out that one of the major changes in the most recent : > S6 is that named arguments are now marked by : rather than +, with : > :foo($bar) being the way to declare

Re: +$arg changed to :$arg

2005-10-26 Thread Larry Wall
space is required after the colon indicating a null invocant. method doit (: $a, $b, $c) But it's only slightly serious, considering that it has a smiley. Larry

Re: Ways to add behavior

2005-10-26 Thread Larry Wall
On Tue, Oct 25, 2005 at 05:17:40PM -0400, Stevan Little wrote: : Larry, : : On Oct 25, 2005, at 4:37 PM, Larry Wall wrote: : >On Mon, Oct 24, 2005 at 06:33:20AM -0700, Ashley Winters wrote: : >: # behavior through prototype -- guessing realistic syntax : >: Base.meta.add_method( : >

Re: +$arg changed to :$arg

2005-10-26 Thread Larry Wall
On Wed, Oct 26, 2005 at 04:59:04PM +0200, Juerd wrote: : Larry Wall skribis 2005-10-26 7:31 (-0700): : > One slightly serious ramification of the : switch is that the space : > is required after the colon indicating a null invocant. : > method doit (: $a, $b, $c) : : Or, we could se

Re: Ways to add behavior

2005-10-26 Thread Larry Wall
nymous with "class", Unfortunately "sort" is already hosed. Maybe "kind". Then evolutionists could make jokes about the K(T) boundary, and creationists could make jokes about "reproducing after their kind". Some of us could make either kind of joke. But perhaps it wouldn't be kind. Larry

Re: Ways to add behavior

2005-10-26 Thread Larry Wall
On Wed, Oct 26, 2005 at 12:22:07PM -0400, Stevan Little wrote: : : On Oct 26, 2005, at 12:05 PM, Larry Wall wrote: : >Of course, there are other words that are somewhat synonymous with : >"class", Unfortunately "sort" is already hosed. Maybe "kind". : :

Re: +$arg changed to :$arg

2005-10-26 Thread Larry Wall
On Wed, Oct 26, 2005 at 07:06:15PM +0200, TSa wrote: : HaloO, : : Larry Wall wrote: : >On Wed, Oct 26, 2005 at 04:59:04PM +0200, Juerd wrote: : >: Larry Wall skribis 2005-10-26 7:31 (-0700): : >: > One slightly serious ramification of the : switch is that the space : >: > is

Re: Ways to add behavior

2005-10-26 Thread Larry Wall
, for instance. : 3) Aren't classes mutable and roles immutable by default only? Or has : this changed? Of course. To change the default for a role, call it a class, and to change the default for a class, call it a role. :-) Larry

Re: Roles vs. Classes (was Re: Ways to add behavior)

2005-10-26 Thread Larry Wall
ility before you know whether it's going to affect performance. Part of the power of Ruby on Rails reputedly comes from the fact that Ruby leaves its classes open by default. Larry

Re: Ways to add behavior

2005-10-26 Thread Larry Wall
ean: $x.kind :: $y.kind Now all we need is infix:<:> to calculate the value of the relationship of two items, and we can write: $a : $b :: $c : $d :-) * .5 Larry

Re: Ways to add behavior

2005-10-26 Thread Larry Wall
On Wed, Oct 26, 2005 at 06:34:48PM -0700, Larry Wall wrote: : On Wed, Oct 26, 2005 at 04:56:23PM -0600, Luke Palmer wrote: : : > Then ^T $x binds T to the kind of $x. And $x.kind == $y.kind asks : : > if two objects are of the same type, : : : : Don't you mean $x.kind eqv $y.kind? :

Re: Roles vs. Classes (was Re: Ways to add behavior)

2005-10-26 Thread Larry Wall
{ : > does Some::Class; : > } : > : > Problem solved. : : Don't forget the fun of modifying all existing uses of Some::Class to : use My::Version instead, if that's even possible. That should mostly be handled by virtualized class names. Larry

Re: Is there a way to generate an object without new?

2005-10-27 Thread Larry Wall
or, and the current scope has an A alias to that long name, and that might collide with the A name of &A in the current scope. : Or, more explicitly (and more readably IMO): : : sub A (\$x) { A.new(*$x) } Sorry, &A is introduced immediately, so you've just written a nice infinite recursion. I'd suggest sub A (\$x) { ::A.new(*$x) } Larry

Re: Roles vs. Classes (was Re: Ways to add behavior)

2005-10-27 Thread Larry Wall
ow if it'll do what you mean. If you're trying to establish a policy that defaults a particular name to a particular version, the library interface will probably give you a more straightforward way to set that up. Larry

Re: co/contra variance of roles/factories in theory.pod

2005-11-04 Thread Larry Wall
form $: this knowledge is *not* forwarded in the inheritance : process. The non-twigiled forms of variables are lexically scoped without : relation to the object state. : : Question: what is the current state of affairs in @Larry about the private : instance data notation? Is it still with an under

Re: new sigil

2005-11-04 Thread Larry Wall
On Fri, Nov 04, 2005 at 08:14:11PM +0100, TSa wrote: : HaloO, : : Larry Wall wrote: : >On Tue, Oct 25, 2005 at 10:25:48PM -0600, Luke Palmer wrote: : >: Yeah, I didn't really follow his argument on that one. I, too, think : >: that the one() junction in general is silly, especi

Re: Ways to add behavior

2005-11-05 Thread Larry Wall
On Sat, Nov 05, 2005 at 01:55:11AM +0100, TSa wrote: : Larry Wall wrote: : >The notion of constraints or limitations is already conveyed by : >"where", and some subtypes may just be aliases. : : Wouldn't 'bound' work? Perhaps combined with 'on': : : b

Re: Ways to add behavior

2005-11-07 Thread Larry Wall
tually looks like this? my &meth(Method: $self: \$args) I also wonder about hybrid hash/arrays: my %harry(HashArray: Key^Int --> Any); It would be nice to generalize this sufficiently to be able to declare polymorphic objects resembling match objects: my $matchobj(Poly: Key^Int^Notthere --> Any); Or maybe that should be: my $matchobj\(Highlander); :-) Larry

Re: Ways to add behavior

2005-11-07 Thread Larry Wall
On Mon, Nov 07, 2005 at 09:37:04AM -0800, Larry Wall wrote: : It would be nice to generalize this sufficiently to be able to declare : polymorphic objects resembling match objects: : :my $matchobj(Poly: Key^Int^Notthere --> Any); : : Or maybe that should be: : :my $matchobj\(Highlan

Re: =>'s container and binding semantics

2005-11-07 Thread Larry Wall
ur pairs are containers, not values. Maybe \(key => $value) is how you turn => into ::>, since in the case of an arglist you have to be able to bind to the original $value. Or maybe :> is our named arg syntax and => is always a pair. Larry

Re: =>'s container and binding semantics

2005-11-07 Thread Larry Wall
On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote: : Also, if we provide a way to return a pair instead of a value from a : hash (currently done with the new :%hash syntax), Whoops, I forgot I changed that to %hash: (and %hash:{'key'} too). Larry

Re: Perl6 perlplexities [was: "Re: $1 change issues..."]

2005-11-07 Thread Larry Wall
only strengthens my point: it's hard to do : it right in Perl 5! Okay, I won't shout (not even on PerlMonks :-), but named parameters default to optional, so you'd have to write that as sub convert (:$from!, :$to!, :$thing!) { ... } in the current scheme of things. Larry

Re: =>'s container and binding semantics

2005-11-07 Thread Larry Wall
On Mon, Nov 07, 2005 at 11:20:39PM +0200, Ilmari Vacklin wrote: : On Mon, Nov 07, 2005 at 12:05:30PM -0800, Larry Wall wrote: : > On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote: : > : Also, if we provide a way to return a pair instead of a value from a : > : hash (currently

Re: Ways to add behavior

2005-11-08 Thread Larry Wall
On Mon, Nov 07, 2005 at 08:44:28PM +0100, TSa wrote: : HaloO, : : Larry Wall wrote: : > : ::Takes3Ints ::= :(Int,Int,Int --> Any); : > : : > : my &foo:(Takes3Ints); : > : > I'd say that has to be something like: : > : > my &foo:(T

Re: private methods and role composition

2005-11-08 Thread Larry Wall
w them to be called with something resembling ordinary dispatch syntax (probably via $!foo and $obj!foo() these days) but the public and private dispatch mechanisms have no overlap. Larry

Re: given too little

2005-11-10 Thread Larry Wall
being aware of it, as long as we restrict the autodelay to apply only to things that can only return boolean officially. We mustn't apply it to things that just happen to be able to return boolean in boolean context, or things like when %foo can't work. Larry

Re: Test Case: Complex Numbers

2005-11-11 Thread Larry Wall
uke : : [1] I think I'm going to embark on writing down the laws for a few of : our basic types so we can actually talk about this without speculating : so greatly. While you're there, also think about the gray area between arrays and hashes, and whether .[...] subscripts are just a specialized form of .{...} subscripts. Larry

Re: What's the latest on Iterators?

2005-11-11 Thread Larry Wall
dependent ones? An array can have as many iterators as it likes, according to A6. There's an underlying .specs objects that contains the specifications for how to genererate "missing" values, and if the specs are smart enough, they can be generated from either end. Larry

<    5   6   7   8   9   10   11   12   13   14   >