use Perl Log In
Article Poll
What is your favorite operator from Perl 6?
unary _, string context (4)
binary ~~, logical xor (7)
unary *, list contex (6)
unary ^, vector ops (19)
unary :=, binding (15)
unary //, logical 'default' operator (39)
(You may not vote anonymously. Please
log in.)
[ Results |
Polls ]
Comments:4 | Votes:90
Exegesis 3 Posted
Trey writes "For all those wanting to see Apocalypse 3 in action, Damian has written Exegesis 3."
Excellent. Now if I can only finish reading Apocalypse 3
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.

When? (Score:1)
Re:When? (Score:1)
You mean: apart from the one in my head that I use to write the Exegeses?
My best guess would be about 12 months from now, though there might well be alphas for parts of the language within six months.
Damian
tuple context? (Score:1)
my ($name, $vers, $status, $costs) = ;
ability to return only 4 scalars available for normal functions?
eg wantarray returning 4 ?
Re:tuple context? (Score:1)
my ($name, $vers, $status, $costs) = <$fh>;
Re:tuple context? (Score:1)
Want (Score:1)
Question on adverb syntax (Score:1)
sub mean (*@values : $type
given ($type) {
when 'arithmetic': { return sum(@values) / @values; }
when 'geometric': { return product(@values) ** (1/@values) }
--
Trey Harris
Secretary, The System Administrators Guild [sage.org]
Re:Question on adverb syntax (Score:1)
mean arithmetic:@vals
or would you have to write
mean 'arithmetic':@vals?
Neither, I'm afraid. Since the @values parameter is on the left and the $type parameter is on the right, you'd write:
mean @values : 'arithmetic'
And, no, there's no autoquoting, unless you explicitly specify it:
sub mean (*@values : $type is stringified
(and Larry hasn't signed of on such a parameter trait yet either)
Re:Question on adverb syntax (Score:1)
print : ($x * $y) * $z;
in order to effect the old print +(...),
Or I think I do.... Surely the filehandle (empty in this case) is an initial adverb and the direct objects are the parameters. But if adverbs are only permitted at th
--
Trey Harris
Secretary, The System Administrators Guild [sage.org]
Re:Question on adverb syntax (Score:1)
It has two (that's going to be common in Perl 6).
One is colonic:
print ( $filehandle
The other is not:
print ( *@list )
So, in the colonic version (we have to find a better adjective!), it's the values to be printed that are conceptually the adverbs.
Like I've said elsewhere though: the use of post-colonic parameters as adverbs is merely a way of thinking about
Re:Question on adverb syntax (Score:1)
I got it. Thanks!
[print] has two (that's going to be common in Perl 6).
One is colonic:
print ( $filehandle
The other is not:
print ( *@list )
How would I refer to these? Is 100% of the signature required, or just some disambiguating portion?
--
Trey Harris
Secretary, The System Administrators Guild [sage.org]
Re:Question on adverb syntax (Score:1)
Probably just the type-and-number components of the signature, with the parameter names optional (and ignored). So any of:
:= &print($filehandle : *@list);
:= &print($foobar : *@baz);
:= &print($:*@);
temp &myprint
temp &myprint
temp &myprint
unary * thingy (Score:1)
be written as my ($name, $vers, $status, $costs, *@and_the_rest) = <$fh>;
Or am I totally off ?? - Just wondering...
Re:unary * thingy (Score:1)
You're totally off.
The slurpative asterisk is only needed in parameter lists or the lvalues of a
Plain ol' assignment in Perl6 remains exactly the same as plain ol' assignment in Perl 5.