4 ms·
What next? `ZERO = 0`, `ONE = 1`, ...?
by marcandre 6y ago
What next? `ZERO = 0`, `ONE = 1`, ...?
- arethuza 6y agoPretty sure I've seen that as well (different codebase though) - that kind of thing happens when you have a code style rules that says "No literals in code, always define constants" and people take it literally.
- klibertp 6y agoYou know, it wasn't that long ago when booleans in Python were essentially: True = 1 False = 0
- Izkata 6y agoWasn't there a post here a month or so ago where someone found something like "three = 5" in the linux kernel?
- snapetom 6y agoI had a coworker do this all over a Cold Fusion codebase. He also claimed he used to be a dentist in Mexico, so anywhere he had his name, email sigs, code comments, etc., he would sign add "DDS" after his name. Dude was a trip.
- mLuby 6y agoChurch encoding is mind-bending. ZERO = (f, x) => x ONE = (f, x) => f(x) TWO = (f, x) => f(f(x)) THREE = (f, x) => f(f(f(x))) TRUE = (a, b) => a FALSE = (a, b) => b IF = (p, a, b) => p(a, b) NOT = (p, a, b) => p(b, a) AND = (p, q) => p(q, p) OR = (p, q) => p(p, q)