no, the parser fucking blows.
you can't do this:
print $fds[$i] "Perl sucks\n";
even if $fds[$i] is a valid fd. because either Perl's
parser sucks, or Perl's grammar sucks.
>>1
whether $fds[$i] is a valid FH occurs only at runtime. use >>2's solution (put {} around it) or one of the OO filehandle modules and $fds[$i]->print("i'm retarded");
depending on what you're trying to do one of these (better) solutions could apply:
a.) you're just printing a constant string to a list of filehandles - use print $_ "foo" for ($fds);b.) if you're using $fds[$i] more than once in a block, save it to a scalar first.
Name:
Anonymous2006-07-14 20:56
>>3
Perl has a retarded syntax regardless of if you can do what >>1 wants or not. Seriously, it's the worst syntax ever, made of ambiguous, obscure, and retarded decisions, must have been made by a 12 year old BASIC kid. Perl designers (if we can call them designers - they work more like astrologers) should stuff DWIM, lack of parenthesis, {}, next, last, = () = hacks, $_, my, sub, ->, $@% hungarian notation, \$, <>, while (<>), one line blocks, lack of comma, and all the other shit up their asses.
Name:
Anonymous2006-07-14 21:10
Perl was created by Larry Wall, who is apparently a linguist. Guess that means linguists shouldn't be creating programming languages.
Amusingly, one of his quotes reads:
"Lisp has all the visual appeal of oatmeal with fingernail clippings mixed in."
The inventor of the ugliest language _ever_ disparaging the only language that is beautiful? Lawl.
Name:
Anonymous2006-07-15 0:54
Lisp is beautiful in the same way a turing machine is beautiful: only if you're a looney mathematician. Sorry, man, it's not beautiful at all, except from afar.
There's no doubt that Perl's syntax is unadulterated evil though.
Name:
Anonymous2006-07-15 1:10
Perl isn't supposed to be beautiful. It's supposed to be practical and efficient. At the time there weren't a lot of languages that could do as many array related functions as Perl can.
Name:
Anonymous2006-07-15 3:05
Writing in a "beautiful" language is for faggots. Perl lets you write what you mean and doesn't rape you up the ass with ideology and rules for the sake of rules.
Name:
Anonymous2006-07-15 3:56
Perl isn't supposed to be beautiful. It's supposed to be practical and efficient. Writing in a "beautiful" language is for faggots
There is no such thing as a beautiful programming language unless you fap to legacy COBOL or something (because it's so manly!). However if perl had a syntax that doesn't make it look like a cat waltzed across the keyboard would increase any perl programmer's efficency like 200%
>>8
Perl is not practical or efficient for the developer (i.e. productive) because maintenance is a fucking bitch. Even if you can get away without using the fugly shit, you'll always have to deal with others' code unless you're a kid that pretends to be a programmer.
Array functions are nice, but every new scripting language has a better syntax than Perl. The fact nobody else does it is no excuse to do it in a lame way.
>>9
Perl actually has more rules with all that DWIM shit and ambiguity to solve.
Name:
Anonymous2006-07-15 13:08
>>11
Sorry but you obviously have no real world experience with Perl. CPAN committers and real perl programmers (not the COOP student you and your breathern are) program perl which can use a variety tricks and still be maintainable and readable. It sounds like you've never dealt with a program over the size of 30KLOC.
Damien Conway's new style guide helps newbies get up to speed. Perl doesn't restrict you but if you want to work with others you might have to restrict yourself.
If you really think Ruby and Python are so much different you're obviously blind. They are basically 1 to 1 with perl.
Feature-wise? Yes, there's a rough parity. For syntax though? No, and syntax matters a lot.
I agree that it's possible to make maintainable Perl programs, and I'll even agree that's it's pretty easy to do so. Even so, I find that I need perl's manpages far too much for comfort, even after all these years.
Name:
Anonymous2006-07-16 7:23
Syntax gets in the way. There is an inverse correlation between the amount of syntax a language has and how easy it is to understand.
Name:
Anonymous2006-07-16 15:47
both python and ruby overload tonnes of operators with stupid shit. You cannot claim superior syntax when python pulls off bullshit like a + [b].
Name:
Anonymous2006-07-16 16:47
People who think operator overloading is bad are stupid.