News:

Holy shit, it's 2018 2019 2020 2021 2022 2023 2024, and the US isn't a fascist country! What a time to be alive.

Main Menu

perl...

Started by warz, June 10, 2008, 01:54:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iago

That's not true at all. My Perl code doesn't look significantly different from my C or PHP code.

warz

Either you're not making use of all the nifty Perl features, or you're just used to reading Perl. :P
http://www.chyea.org/ - web based markup debugger

iago

Of course I'm not making use of the "nifty" features, they tend to make the code ugly/unreadable. I program it in the cleanest way I can.

warz

Quote from: iago on June 13, 2008, 02:04:55 PM
Of course I'm not making use of the "nifty" features, they tend to make the code ugly/unreadable. I program it in the cleanest way I can.

Ugly and unreadable to the untrained eye! They can speed things up if everyone knows what they means. But, there's always the English module if you don't like the whacky unreadable variable names.
http://www.chyea.org/ - web based markup debugger

Sidoh

Even if everyone is familiar with the shortcuts, there's still a fair amount of extra tracing overhead involved when it's used excessively.

zorm

Quote from: iago on June 13, 2008, 02:04:55 PM
Of course I'm not making use of the "nifty" features, they tend to make the code ugly/unreadable. I program it in the cleanest way I can.


I do much the same, since it makes life easy when someone else wants to glance at my code and see what I did. English readable code for the win.
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham

warz

wtf...


    sub wanted {
        /^\.nfs.*\z/s &&
        (($dev, $ino, $mode, $nlink, $uid, $gid) = lstat($_)) &&
        int(-M _) > 7 &&
        unlink($_)
        ||
        ($nlink || (($dev, $ino, $mode, $nlink, $uid, $gid) = lstat($_))) &&
        $dev < 0 &&
        ($File::Find::prune = 1);
    }


=X
* warz head spins
http://www.chyea.org/ - web based markup debugger

zorm

Thats a pretty good example of why writing *readable* code is a good thing, no matter what language you are using...
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham

warz

#23
hehe yeah, it's just the new lines that make that tough to read. it's essentially just a return statement.
http://www.chyea.org/ - web based markup debugger

Camel

It would be a lot less ugly as a try/catch block.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!