[kw-pm] Perl6 Update

Eric - fishbot eric at uc.org
Wed Nov 24 21:38:52 CST 2004


As the "official" Perl6 watcher for kw.pm -

Last week four "new" Synopses were posted at
http://dev.perl.org/perl6/synopsis/

s10 => Packages
s11 => Modules
s12 => Objects
s13 => Overloading

Which correspond to chapters 10..13 in the camel book.

The synopses are both the "pocket guide" to Perl6, and the
specification.

s11..s13 are taken from the enormous a12 document, split up
by topic.  s10 is a synopsis of an imaginary a10, and thus
is "new" material.

Things I found interesting:

s10: Packages
--------------------
Packages are no longer always relative to main::.  You can
do "our package Foo;" for a new subpackage that has a
lexically scoped alias.  Thus $Foo::bar and $Baz::Foo::bar
might be relative and fully qualified names for the same
variable.

Also, you can have a "my package Foo;", just as you can have
a "my sub bar {}".

s11: Modules
--------------------
Not sure I love the module versioning logic, but at base it
will default what I normally want.

I do love the new export semantics, though.  I can
understand an argument against, in that what is exported is
no longer obvious and grouped at the top of a module.  But
if you have to open the source to use a module, there are
bigger problems anyway, I think.  perl6doc should have a
switch that shows the export tables for the module ;)

s12: Objects
--------------------
Even in Synopsis form this is long.  But, it's -much- more
readable, and only an 8th of the length of the Apocalypse.

s13: Overloading
--------------------
The multi is deep trait is quite interesting.  It causes
operator autogeneration like Perl5 overloading does, but the
autogeneration table is accessible to pragma and modules.

I also thought that the use of the alias operator on
overloadable core operators was interesting.  It made me
think about the way symbol tables are going to handle multi
slots.  Glad that I don't have to make those decisions.


Anyway, if you (understandably) put of reading a12, now is
your chance to get the same information, in a palatable
form.

fishbot


More information about the kw-pm mailing list