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
Re:When?
Damian on 2001-10-06T00:48:11
When all is said and done, when I we going to see a working beta of perl6?
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
Re:tuple context?
pixel on 2001-10-06T15:46:00
booh, "Plain Old Text" ate the end, it should of course be:my ($name, $vers, $status, $costs) = <$fh>;
Re:tuple context?
Damian on 2001-10-07T01:34:17
Assuming Larry accepts the gist of RFC 21, then yes. Using , any subroutine will be able to determine how many values it's expected to return.Want
robin on 2001-10-07T16:10:51
You can already do that in Perl 5, if you install my Want module.
Re:Question on adverb syntax
Damian on 2001-10-08T07:11:13
Would you be able to write
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//= 'arithmetic') {
(and Larry hasn't signed of on such a parameter trait yet either)Re:Question on adverb syntax
Trey on 2001-10-08T13:04:03
Ah, then clearly more than meets the eye is going on with your print examples. Can one put an adverb anywhere in the parameter list when declaring a subroutine, or only at the end? I notice that the empty adverb list is used in
print : ($x * $y) * $z;
in order to effect the old print +(...),...; behavior.
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 the end, then I guess print could take any number of adverbs but only a single, optional, filehandle parameter. That seems weird. So what does print's signature look like? Can one declare several adverbs in a sub declaration?Re:Question on adverb syntax
Damian on 2001-10-09T06:57:19
...clearly more than meets the eye is going on with your print examples... So what does print's signature look like?
It has two (that's going to be common in Perl 6).
One is colonic:
print ( $filehandle//= $*OUT : *@list )
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 them. All that matters is that the parameter list of any suitably defined subroutine/function can be divided into two sections by a colon. Which of those sections you consider adverbial is entirely up to you.Re:Question on adverb syntax
Trey on 2001-10-09T15:45:46
Like I've said elsewhere though: the use of post-colonic parameters as adverbs is merely a way of thinking about them.
I got it. Thanks!
[print] has two (that's going to be common in Perl 6).
One is colonic:
print ( $filehandle//= $*OUT : *@list )
The other is not:
print ( *@list )
How would I refer to these? Is 100% of the signature required, or just some disambiguating portion?
temp &myprint:= &print( $filehandle //= $*OUT: *@list )
would work, I assume (can I omit that space before the colon?), but would
temp &myprint:= &print( $filehandle : *@list)
or
temp &myprint:= &print ( $foobar : *@baz )
or
temp &myprint:= &print ( $filehandle : @list)
or even
temp &myprint:= &print ( $ : *@ )? Re:Question on adverb syntax
Damian on 2001-10-10T02:40:05
How would I refer to these? Is 100% of the signature required, or just some disambiguating portion?
Probably just the type-and-number components of the signature, with the parameter names optional (and ignored). So any of:
temp &myprint:= &print($filehandle : *@list);
temp &myprint:= &print($foobar : *@baz);
temp &myprint:= &print($:*@);
Re:unary * thingy
Damian on 2001-10-09T06:48:56
Or am I totally off ??
You're totally off.;-)
The slurpative asterisk is only needed in parameter lists or the lvalues of a:= binding operation.
Plain ol' assignment in Perl6 remains exactly the same as plain ol' assignment in Perl 5.