View Single Post
11-18-16, 01:22 AM   #38
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Lua doesn't have ternary syntax either. It's two binary logic operators taking advantage of shortcuts Lua takes in evaluating them. It's literally a hack to implement.

When I quickly scan through code to try to understand what it's doing, my mind has a hard time registering not not and only sees one of them, which throws in a bit of confusion requiring a couple more looks over finally catch it.

Feel free to use it in your own code, but I reserve the right to respectfully disagree.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote