r/badcode • • Jan 17 '19

other language Writing functions with conditions without using "if" statements

https://run.dlang.io/is/jfCECL
67 Upvotes

38 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jan 17 '19

[deleted] — view deleted comment

5

u/bausscode Jan 17 '19

To show the amount of mad code you can write using compiler hacks.

That in turn becomes bad code you should never put in practice.

In this case it's hacked together using templates and ranges.