On 5/4/06, Paul Johnson <[EMAIL PROTECTED]> wrote:
On Thu, May 04, 2006 at 01:56:44PM +0300, Markus Laire wrote:
Thanks for taking the time to explain this. The long dot here does seem to be
solving more important problems. Now I'm not as up to date with Perl 6 syntax
as I once was, nor as much as I probably should be to be part of this thread,
but ...
> IMHO This example from S03 is a lot better:
>
> <quote>
> Whitespace is no longer allowed before the opening bracket of an array
> or hash accessor. That is:
>
> %monsters{'cookie'} = Monster.new; # Valid Perl 6
> %people {'john'} = Person.new; # Not valid Perl 6
What does "Not valid Perl 6" mean? A syntax error? Is it not possible
to make it valid and to mean what would be meant without the whitespace?
Yep, I think it's syntax error.
Note that {} here is a postfix (actually postcircumfix) operator, and
the decision to never allow whitespace before postfix operators seems
to be quite fundamental in perl6.
Some relevant sections from Synopses:
(These sections are quite long, so I'm not copy-pasting them here.)
From Synopsis 2 at http://dev.perl.org/perl6/doc/design/syn/S02.html
See the section starting with "In general, whitespace is optional in
Perl 6 except"
From Synopsis 3 at http://dev.perl.org/perl6/doc/design/syn/S03.html
See the section starting with "List operators are all parsed consistently."
And Synopsis 4 at http://dev.perl.org/perl6/doc/design/syn/S04.html
is also related to this.
However, I'm really not looking to drive perl6-language round in circles, so if
there is some document somewhere explaining the rest of the several useful
side-effects I'd love a pointer to it (I couldn't find anything appropriate).
Have you *recently* read the Synopses at
http://dev.perl.org/perl6/doc/synopsis.html
I'm currently re-reading them, and if you have some time (few days or
weeks :), I'd suggest reading them all.
--
Markus Laire