[Pdx-pm] Perl 6 Docs and Differences

Erik Hollensbe erik at hollensbe.org
Fri Oct 3 15:27:40 PDT 2008

On Friday 03 October 2008 12:26:15 Michael G Schwern wrote:
> The most up to date Perl 6 specification and docs can be found here:
> http://perlcabal.org/syn/
> These are pulled straight from the repository (and thus Larry's brain).
> Another really useful doc is this outlining the differences between Perl 5
> and Perl 6.
> http://perlcabal.org/syn/Differences.html

I'm reading the differences page, and some things seem familiar from other 
languages; I was hoping that in lieu of having to pour through the spec 
(which still appears to be a moving target) I could just ask and maybe 
someone involved more than I would know. A lot of this looks very neat.. I'm 
just curious about a few things:

It seems like ~~ is a more primitive ocaml match/ruby case, where there is the 
concept of "match equality" (I'm thinking of the file tests and regexes 
particularly) that may be different from standard equality. Is that correct? 
Does ~~ provide a direct syntax for multiple possible matches, or is that 
expected to be provided by the boolean operators, e.g., to test if a file is 
a directory or a file:

$fn ~~ :f | :d # I doubt this is right but I hope this gets the point across

or is there something more along the lines of:

match $fn
with :f
with :d

which could potentially express the same thing.

Another curiosity is the change in how code refs are used in method calls. 
Does this apply to the soft reference special case as well?

e.g., perl 5:

$foo = "bar";

$self->$foo("something"); # calls $self->bar("something");

Also, unless I'm missing something, the whole concept of soft references seems 
unaddressed. Are these disappearing entirely? While 99% of the time they are 
something to avoid, the 1% of the time they're handy... they're really handy.

Anyways, the progress that's being made and seeing it take shape is a very 
exciting thing; thanks for linking these documents.


More information about the Pdx-pm-list mailing list