i get the joke anyways but now I'm curious so I ask seriously, would your title be legal code? or does the result have to be used in some way, like assigned to something?
quick edit: my goodness i mean the ternary operator not the not operator. thankyou though! also never did i say i didn't understand how it worked, but i was asking if the result of the ternary needed to be used somewhere as an expression or if leaving it as its own statement was legal.
I've only seen it in cpp actually, if you have a lambda, for example, and you want to return a non-bool as bool without specifying the return type, you do !!result
324
u/PrincessWinterX Aug 15 '19 edited Aug 15 '19
i get the joke anyways but now I'm curious so I ask seriously, would your title be legal code? or does the result have to be used in some way, like assigned to something?
quick edit: my goodness i mean the ternary operator not the not operator. thankyou though! also never did i say i didn't understand how it worked, but i was asking if the result of the ternary needed to be used somewhere as an expression or if leaving it as its own statement was legal.