4 ms·
You're right as far as you go, but it's not an all-or-nothing thing. Most languages won't let you write mathematics exactly like mathematicians do, but the clos
by lmm 11y ago
You're right as far as you go, but it's not an all-or-nothing thing. Most languages won't let you write mathematics exactly like mathematicians do, but the closer you can get the better. For many cases avoiding infix entirely would be a big cost.
(FWIW Scala allows postfix operators, though you'd have to put the n! in brackets)
- sklogic 11y ago> Most languages won't let you write mathematics exactly like mathematicians do, but the closer you can get the better See Wolfram Mathematica for example. Also, one of my usual DSL tricks is to allow arbitrary TeX in identifiers, which, combined with the literate programming tricks, allows to write very idiomatic mathematical expressions as a code.