#perl - Tue 27 Mar 2007 between 10:14 and 10:18



rindolfintegral: I was talking to ofer0.
peterSthreat2: well, you can use 'and' and 'or' operators to similar effect
rindolfintegral: there's also && ||
idesthreat2: well you could do put the whole if() {} else {} on one line, but that's not recommended :)
integralrindolf: Pardon? You said "< rindolf> integral: what's waffling?"
Khisanthsh3mh4mf0r4sh: ran into that problem a few weeks ago, forgot what the problem was but reading the source of the tests made it somewhat obvious
threat2ides: haha
rindolfintegral: you said "Rindolf: you're waffling again."
integralQuite *Clearly* that was "talking to [integral]"
rindolfintegral: well, forge it.
mauke(FALSE, TRUE)[!!(EXPRESSION)]
rindolfmauke: heh.
mauke++
Obfu-Perl.
ofer0mauke, nice one !!
threat2mauke: wow
mauke: that is so illegible :)
rindolfThere's also this [$a =>$b]->[$a <= $b]
threat2: don't use it.
ofer0rindolf, where's the else ?
threat2rindolf: ok
rindolfofer0: => is a comma.
peterS(TRUE,FALSE)[!(EXPR)] is so much more readable than (FALSE,TRUE)[!!(EXPR)]
actionnanonyme thinks foo ? bar : baz isn't nice since some peope have the tendency to chain it. it isn't very readable if you have do a long elseif structure with it :/
nanonymethinks foo ? bar : baz isn't nice since some peope have the tendency to chain it. it isn't very readable if you have do a long elseif structure with it :/
maukeof course
threat2peterS: yeah
rindolfIt's from effective Perl programming.
threat2peterS: that is insane though :)
peterSyes
integralnanonyme: the chaining is perfectly clear if you split it over lines clearly
perlygatekeeperextintor: force install XXX
rindolfthreat2: I hope you're not flabbagasted by the "There's more than one wrong way to do it." here.
threat2peterS: so that makes an array, then selects the element depending on true (1) or false (0) ? isn't making an array inefficient?
rindolf"Perl 6 - There are too many ways to do it" -- Offer Kaye
actionsomian returns from breakfast
somianreturns from breakfast
threat2peterS: compared with a if else blockC?
extintorperlygatekeeper: thank you, will try it :)
rindolfthreat2: don't overuse ? : though. Instead extract methods or functions.
extintorseemed a bit harsch :)
peterSthreat2: the efficiency I do not know about, because perl _does_ optimize the code as it compiles it. but it is a stupid way to express the concept, nevertheless.

Page: 5 12 19 26 33 40 47 54 61 68 75 82 89 96 103 110 117 

IrcArchive