>>18,19
Stop trying to tell me what syntax you think looks nicer. It's the same exact thing just more compact.
As long as you still indent that statement there is no problem.
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.
>>25
You might want to brush up Perl: ~$ re.pl
$ my $perl;
$ $perl == "ugly";
Argument "ugly" isn't numeric in numeric eq (==) at (eval 271) line 6.
>>25
That example is indeed ugly, on the other hand don't you find it rather odd that all Scottish sheep are black?
Name:
Anonymous2012-01-20 18:45
>>29
There's nothing special about that snippet. It's not like i handpicked it from a code obfuscation contest. All code with lots of short variables looks about equally ugly.
The code was obviously somewhat golfed, and the C version probably reads much the same anyway. On the other hand, if you'd care to prove that it can't be written much more clearly then you can make your point.
>>38
Sure they do. That doesn't have anything to do with Perl though.
Name:
Anonymous2012-01-20 21:32
>>39
Well yes, they look ugly because of sigils. In average perl code maybe 4% of all characters are THE UGLIEST A$$ KEY CHARACTER while in one-letter variable heavy code that number goes up to maybe 20%.
It's also harder to tell $i, $j and $l apart than i,j and l or at least it is for me.