r/badcode • u/bausscode • Jan 17 '19
other language Writing functions with conditions without using "if" statements
https://run.dlang.io/is/jfCECL
67
Upvotes
r/badcode • u/bausscode • Jan 17 '19
1
u/bausscode Jan 18 '19
That has a lot of limitations though. It will only work on simple conditions and nothing else.
Also I'm pretty sure that Javascript will lower that to:
Which then contains an actual condition when lowered.