in reply to How Much Is Too Much (on one line of code)?

I won't tell you which of us argued which in order to avoid possibly prejudicing you :)

So, now that the thread has several replies care to fill us in on which side you took?

  • Comment on Re: How Much Is Too Much (on one line of code)?

Replies are listed 'Best First'.
Re^2: How Much Is Too Much (on one line of code)?
by Ovid (Cardinal) on Jun 20, 2007 at 08:15 UTC

    I'm very much in the "that's too much" camp. I first read the code, thinking through the ternary operator that perhaps it wasn't the best way to write that, and then my thought process came to a screeching halt when I reached the statement modifier. As pointed out by a couple of wise monks, an assignment statement which must be read right to left and then left to right is just confusing.

    Of course, it's also trying to pack more than one business rule in the same expression -- something else that is also asking for bugs.

    Cheers,
    Ovid

    New address of my CGI Course.