On 5/29/06, Darren Duncan <[EMAIL PROTECTED]> wrote:
I discovered in reading Synopsis 12 today that some code examples use
out of date syntax, as I understand it:

For example, look in the "Roles" main documentation section.

There are many places where the bareword "self" is used, whereas I
believe the current syntax is "$?SELF" for the same thing, and has
been for awhile.

Actually, I seem to recall `self` being accepted as the correct form,
though I can't remember exactly when that was.

I'm fairly sure the "self" syntax is invalid.

It's just a 0-ary sub call, I believe.

Moreover, S12 explicitly says that Perl 6 has no barewords, save
package names in specific circumstances.

I think that just means P6 has no
barewords-that-are-interpreted-as-strings. You still need to use
"bareword" syntax to write things like class names and subroutine
calls, after you've declared them.

Any "syntactic bareword" without a preceding declaration is assumed to
be a list operator that will be declared later. (Syntactic barewords
are also legal just before `=>`, which autoquotes.)


Reply via email to