in reply to Mr. Ternary is greater than Mrs. If Else

hi,,, while ago i was wondering why do some programmers rarely uses the ternary operator. wherein it is less typing indeed. i believe in the classic virtue of Perl which is laziness. well let me show you something first before i go to my delimma.

I don't think the laziness virtue of Perl extends to sacrificing readability by saving to write a few characters...
I like to be able to rest my eyes on the code, without getting dizzy. ;)

-- 
asksh <ask@0x61736b.net>

  • Comment on Re: Mr. Ternary is greater than Mrs. If Else

Replies are listed 'Best First'.
Re^2: Mr. Ternary is greater than Mrs. If Else
by blazar (Canon) on May 22, 2007 at 17:23 UTC
    I don't think the laziness virtue of Perl extends to sacrificing readability by saving to write a few characters...
    I like to be able to rest my eyes on the code, without getting dizzy. ;)

    I second that. In fact IMHO lazyness alone is not really a virtue. I know, because I'm so lazy!