3 ms·
+/-url("...") in the context of a DSL for building allow/deny rulesets is considerably more self-descriptive than your example from another language that isn't
by extension 16y ago
+/-url("...") in the context of a DSL for building allow/deny rulesets is considerably more self-descriptive than your example from another language that isn't even an operator, just a badly named variable.
Personally, I would have gone with allow/deny instead of +/- but I'm glad the choice is available. It certainly pays off for numeric types or DSLs that involve complex nested expressions e.g. parsing grammars.
- tres 16y agoFair enough. I was pretty fast and loose. Thanks for the correction. My magic vars/operators mix & match was inaccurate, but still appropriate; the point still remains, overloading operators seems risky for long term maintenance if it's not used cautiously. It's clever & no doubt has its usefulness, but as the author of the article implies, it can be (ab)used. And I guess I hopped off the train right there. I think I'll take a look at this again tomorrow with fresh eyes & see what I'm missing. Thanks again for the correction.