Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Perl is not ugly

Name: Anonymous 2012-01-20 3:53

If you think Perl is ugly, you don't know how to use it.

Discuss.

Name: Anonymous 2012-01-20 18:01

Ugly way of extracting function arguments inherited from shell languages, ugly improvised characters like -> for essential operations, ugly pseudo shortcuts like $_ which most of the time aren't even shorter, $ aka the ugliest ascii character all over the code for no good reason, ugly syntax for class declarations because OO is tacked on etc.

Sigils are especially horrendous with lots of short variable names, e.g., in array based algorithms as seen in this snippet from rosettacode:

sub permute (&@) {
        my $code = shift;
        my @idx = 0..$#_;
        while ( $code->(@_[@idx]) ) {
            my $p = $#idx;
            --$p while $idx[$p-1] > $idx[$p];
            my $q = $p or return;
            push @idx, reverse splice @idx, $p;
            ++$q while $idx[$p-1] > $idx[$q];
            @idx[$p-1,$q]=@idx[$q,$p-1];
        }
}


If you don't think this is ugly you should have your eyes checked.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List