8 ms·
Actually, it can take multiple. gte(a: b: c: d:) is equivalent to (in C) a >= b && a >= c && a >= d. By making operators like functions, you can group like-oper
by nercht12 6y ago
Actually, it can take multiple. gte(a: b: c: d:) is equivalent to (in C) a >= b && a >= c && a >= d. By making operators like functions, you can group like-operations and simplify code. Admittedly, it's not as readable for someone accustomed to seeing C style.
Last note: gte(a=100) would produce an error in Copper because a=100 is an assignment statement that returns "a" (a function), and gte( function ) means nothing.
Edit: I see you're referring to Python, but I figured I'd keep the note of comparison.
- kroltan 6y agoThat's... surprising, I could easily expect gte(a: b: c: d:) to possibly mean a >= b && b >= c && c >= d I think it's just not as readable precisely because of the ambiguity.