Question 1:
What is meant by:
has $attribute # lexical alias for $!attribute.
Here is more concrete example. There is none in S12.
class C {
has $a;
method foo ()
{
my $y = $a; # is the correct?
}
In that scope, is $a really a shortcut for $self!a ?
If so,
Brandon S. Allbery KF8NH allbery-at-ece.cmu.edu |Perl 6| wrote:
my ($x, :$named) = foo; # or something like that
That looks to me like a form of positional extraction. (Of course, my
hit rate on p6 stuff has been remarkably low of late...)
It's not just positional, but allows fo
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
Second, I don't like the concept of a virtual method that returns
a type. That horribly mixes type level and value level. From the
They are mixed! Perl treats types as first-class objects. For
functions, types don't need to be treated specia
On Apr 21, 2008, at 9:39 , John M. Dlugosz wrote:
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
I think the type is just :( $: :named$ ) if you want to extract
the invocant with a $ prefix. Otherwise it would be :( $, :named
$ ) and you
extract the item positionally with prefix @ or .[].
HaloO,
John M. Dlugosz wrote:
I hope you have a few minutes to look it over.
I started to think it through. There are two quick remarks.
In
module M
{
class C { ... }
class D
{
# lexical region where C refers to M::C
method m1 () { my
HaloO,
John M. Dlugosz wrote:
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
"Candidate set" would be a better term. It is a subset of all long names
of a multi in a lexical scope.
List, not set, because it is ordered. nextsame/nextwith/etc. are
described as invoking the next candidate on
On Apr 20, 8:38 pm, [EMAIL PROTECTED] wrote:
> "John M. Dlugosz" and I have both replied to "whiteringmoon"'s query, so I
> don't think anyone else need to. (If he's genuine, we don't want to
> bombard him with multiple replies, and if not, let's not give out too much
> spambait.)
>
> --
>
> Email
On Sat, Apr 19, 2008 at 08:00:07AM -, John M. Dlugosz wrote:
: Perl 6 has a concept of a "candidate list". The candidate list are those
that could handle the call, typically inherited methods and multi variations.
:
: It seems that multi variations, at least with respect to the semicolon
HaloO,
John M. Dlugosz wrote:
I don't want to have to "extract" it. I want to be able to say
$x = foo
I guess that does not collapse the capture that foo returns. So
it goes into $x unaltered. If you later use $x as an invocant
of a method this extracts the invocant slot from the captur
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
"Candidate set" would be a better term. It is a subset of all long names
of a multi in a lexical scope.
List, not set, because it is ordered. nextsame/nextwith/etc. are
described as invoking the next candidate on the list. Therefore, there
is
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
I guess with strong you mean as lossless as possible?
I think the type is just :( $: :named$ ) if you want to extract the
invocant with a $ prefix. Otherwise it would be :( $, :named$ ) and you
extract the item positionally with prefix @ or .[].
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
You are right and I didn't address this, sorry. Actually the
only solution I see is dropping the ::? twigil altogether and
specify that CLASS is lexically declared by the compiler.
Otherwise we have to make a special case exception out of
::? vari
HaloO,
Mark J. Reed wrote:
? Multiple-assignment second-class? I don't see how you get that out
of Larry's message...
Well, he explicitly says that loop is second-class because
it uses multi-assignment. Actually he says it "tends to
violate single-assignment". But I interpret that sort of
int
? Multiple-assignment second-class? I don't see how you get that out
of Larry's message...
On 4/21/08, TSa <[EMAIL PROTECTED]> wrote:
> HaloO,
>
> Larry Wall wrote:
> > That is, coro and loop tend to violate single-assignment semantics, and
> > single-assignment semantics are easier to map int
HaloO,
John M. Dlugosz wrote:
Perl 6 has a concept of a "candidate list". The candidate list are
those that could handle the call, typically inherited methods and
multi variations.
"Candidate set" would be a better term. It is a subset of all long names
of a multi in a lexical scope.
It se
HaloO,
Larry Wall wrote:
That is, coro and loop tend to violate single-assignment semantics, and
single-assignment semantics are easier to map into functional semantics.
So if we do allow coro in Perl 6, it'll probably be a second-class
citizen like loop and goto and die (and anything else cons
"John M. Dlugosz" and I have both replied to "whiteringmoon"'s query, so I
don't think anyone else need to. (If he's genuine, we don't want to
bombard him with multiple replies, and if not, let's not give out too much
spambait.)
--
Email and shopping with the feelgood factor!
55% of income t
HaloO,
John M. Dlugosz wrote:
Great. So the flip side is, what do I return from a function so that it
gives a single value if called simply, but provides optional named
returns that are there if you catch them? As a capture with one
positional and one named argument?
Yeah, just that.
An
HaloO,
Larry Wall wrote:
In general, we're trying to get away from want-based context dependency
and instead attempting to encourage lazy semantic constructs such
as Captures that can behave with a wide dynamic range when actually
bound later.
Shouldn't we then change the heading of the respec
HaloO,
John M. Dlugosz wrote:
How about sub foo (--> Seq^Item) {...}?
Interesting idea, but that doesn't tell the compiler that the return is
keyed to the context. The compiler should know what return type to
expect, if only I could explain it.
Sorry, the type has nothing to do with how th
HaloO,
John M. Dlugosz wrote:
I do see that the use in a role is like a generic.
But you would use the sigil every time, e.g.
method doit (::?CLASS $self: ::?CLASS $other --> ::?CLASS)
that is not three separate generics with conflicting names, but the same
thing. With generics you can o
21 matches
Mail list logo