Author Topic: perl...  (Read 6920 times)

0 Members and 1 Guest are viewing this topic.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: perl...
« Reply #15 on: June 13, 2008, 12:44:45 pm »
That's not true at all. My Perl code doesn't look significantly different from my C or PHP code.

Offline warz

  • Hero Member
  • *****
  • Posts: 1134
    • View Profile
    • chyea.org
Re: perl...
« Reply #16 on: June 13, 2008, 12:59:38 pm »
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

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: perl...
« Reply #17 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.

Offline warz

  • Hero Member
  • *****
  • Posts: 1134
    • View Profile
    • chyea.org
Re: perl...
« Reply #18 on: June 13, 2008, 03:12:25 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

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: perl...
« Reply #19 on: June 13, 2008, 04:12:15 pm »
Even if everyone is familiar with the shortcuts, there's still a fair amount of extra tracing overhead involved when it's used excessively.

Offline zorm

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
    • Zorm's Page
Re: perl...
« Reply #20 on: June 14, 2008, 02:40:28 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

Offline warz

  • Hero Member
  • *****
  • Posts: 1134
    • View Profile
    • chyea.org
Re: perl...
« Reply #21 on: June 16, 2008, 03:23:51 pm »
wtf...

Code: [Select]
    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

Offline zorm

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
    • Zorm's Page
Re: perl...
« Reply #22 on: June 17, 2008, 11:27:37 pm »
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

Offline warz

  • Hero Member
  • *****
  • Posts: 1134
    • View Profile
    • chyea.org
Re: perl...
« Reply #23 on: June 18, 2008, 02:51:57 am »
hehe yeah, it's just the new lines that make that tough to read. it's essentially just a return statement.
« Last Edit: June 18, 2008, 12:59:31 pm by warz »
http://www.chyea.org/ - web based markup debugger

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: perl...
« Reply #24 on: June 18, 2008, 05:18:47 am »
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!