4 ms·
I was once banned from using ternary operators, that was weird
by daleharvey 17y ago
I was once banned from using ternary operators, that was weird
- enjo 17y agohave you ever seen them abused ? you'd understand why : (or at least have you thought about it ? you'd understand why : (or at least you can get the gist from this ? good : I can't help you))
- erlanger 17y agoIn a similar vein: Have you read the Drupal source ? Exactly : Take a look
- jcromartie 17y agoThat was perfectly clear to me... :D
- Xichekolas 17y agoYou can use the ternary operator without abusing it. That said, that made complete sense.
- twoz 17y ago<?="I","smarty pants"?"don'tget":"see";?>it.
- deleted 17y ago[deleted]
- crpatino 17y agohave you ever seen them abused ? you'd understand why : (or at least have you thought about it ? you'd understand why : (or at least you can get the gist from this ? good : I can't help you)) Sorry, not perfect but with some indentation would do the job quite nice. Sometimes is not what you write, it is what you don't ;)
- sharkbrainguy 17y agoalso, aren't the parens redundant?
- GrandMasterBirt 17y agoMy post below:
- psyklic 17y agoActually, this is even better than a normal post since I can terminate early without reading the rest ;-)
- mkn 17y agoI guess it all depends: seen them in tabular format ? you know they're great : have you seen them abused ? you think you know : have you thought about it ? you think you know : get the gist from this ? good : I can't help you ;
- jibiki 17y agoThat's quite a bit more readable than the equivalent tower of ifs and elses.
- emilis_info 17y agoWould this be like (cond) in lisp? (cond ((seen-them in-tabular-format) '(you know they are great)) ...)