3 ms·
x + y * z has way fewer than (+ x (* y z)) though. I'm not arguing for one or the other, but e.g. infix operators do have upsides.
by mnarayan01 9y ago
x + y * z
has way fewer than
(+ x (* y z))
though. I'm not arguing for one or the other, but e.g. infix operators do have upsides.
- Jach 9y agoFortunately with Lisp this isn't an unsolvable problem. https://github.com/rigetticomputing/cmu-infix https://github.com/rigetticomputing/cmu-infix
- thoth 9y ago>infix operators do have upsides What you are also glossing over are the precedence rules for operators. In this case it works in favor of your point and LISP indeed needs more parens. However in other situations, you might need to re-parenthesize (language with flat precedence like APL) or consult your favorite chart[0] in order to figure out what is going on. [0] http://en.cppreference.com/w/c/language/operator_precedence http://en.cppreference.com/w/c/language/operator_precedence