Perl6 syntax

You hated Perl5 because of sigil abundance? Or because of it’s dereference syntax? Good. Because Perl6 now has twigils and changes the C-style operator semantics. It now looks less like C and more like insanity. Here’s the big picture.

“Multiple exclamation marks,” he went on, shaking his head, “are a sure sign of a diseased mind.” – Terry Pratchett

Tags: , , , , , ,

3 Responses to “Perl6 syntax”

  1. Cris Says:

    Begging your pardon, this looks rather shitty. :-D

    De unde ai imaginea? I wanna save it.

  2. ggl Says:

    I don’t like it either. Some aspects of Perl6 are quite insane. Either that or I’m not used to them. At least I’m glad they fixed sigil variance. Perl5 is mostly fine, but there are still some annoyances as well. For instance:

    my @array = (1, 2, 3, "foo", undef);
    my $size = scalar @array; # 5
    my $last_index = $#array; # 4
    my $last_value = $array[4]; # undef; or $array[-1]
    # now let's use a reference to our @array
    my $array_ref = \@array;
    my $size = @{ $array_ref }; # 5; or @$array_ref
    my $last_index = $#$array_ref; # 4 < - WTF!? my $last_value = $array_ref->[4]; # undef

    De aici.

  3. ana pauper Says:

    perl jam

Leave a Reply