in reply to "my $p = value if condition()" as bad|deprecated as "my $p if 0" (Naughty indeed)

This node falls below the community's minimum standard of quality and will not be displayed.
  • Comment on Re: "my $p = value if condition()" as bad|deprecated as "my $p if 0" (Naughty indeed)
  • Download Code

Replies are listed 'Best First'.
Re^2: "my $p = value if condition()" as bad|deprecated as "my $p if 0" (Naughty indeed)
by BrowserUk (Patriarch) on Jan 15, 2008 at 23:16 UTC
      Then I truly feel sorry for those who wind up with the crap job of maintaining your code. Maybe you should spend more time writing readable code instead of Golfing your ego at this site ... you guys really have your priorities backwards here. It really is no wonder why Perl is in the sad state she is in right now.

        I find your justifictions for giving up Perl in favour of some cut down and simplified look-a-like, that meets with your personal approval, completely unpersuasive.

        Just because you feel the need to single step through every clause and condition of your code in order to debug it, does not mean that everyone needs to resort to such primitive measures.

        And if the time required to convert a single statement with a post condition into a pre-condition block with two statements, is a significant portion of the time it takes you to decide that it needs to be done, it probably expains why you spend so much time debugging.

        And I find your suggestion that anything like a majority, or even a major minority of the programmers in this world need to have their code delivered in bite-sized morsels unproven. And frankly, vaguely insulting.

        Imagine music without the black notes Cos thirteen are harder than eight to learn Or written without the use of chords Cos multiple tones are hard to discern Further, and just for good measure Imagine that just one meter was used Ev-ery thing would be mo-no-ton-ic Then no one would ever be confused.

        Care to post a semi-substantial piece of your code? I'll re-write it to my standards, and then we can have a proper discussion about maintainability. And if you've any balls, you'll quit hiding behind anonymonk.

        In the meantime. I should have stuck to "Just saying .."


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
Re^2: "my $p = value if condition()" as bad|deprecated as "my $p if 0" (Naughty indeed)
by parv (Parson) on Jan 15, 2008 at 22:23 UTC

    I take it that you do not like statement modifiers for whatever reasons. Otherwise, just what is wrong with ...

    my $p; $p = $q if condition();

    ...?

    A reply falls below the community's threshold of quality. You may see it by logging in.