5 ms·
Some of the choices there make things harder to read. For example, this machine takes two numbers and they are the numerator and denominator. Why on earth use
by two_handfuls 2y ago
Some of the choices there make things harder to read.
For example, this machine takes two numbers and they are the numerator and denominator. Why on earth use ">" for the separator? That already has a mathematical meaning.
- theamk 2y agoI assume you'd prefer to use "/" or "÷" instead? ">" is not a division, it's a rewrite operator, and in the page, it's only used with symbolic representation. I would not call "y div1 /" better than "y div1 >", it's special notation either way. And having special symbol makes it easier to understand when are we talking about regular math vs rewrite rules. (Alternatively, if you meant "why not some other Unicode symbol": I am guessing author wants something easy to type, I can relate)
- cvoss 2y agoBecause the fraction represents a rewrite rule, which is the fundamental unit of computation in this language. Instances of the denominator factors are replaced with instances of the numerator factors. Some people read x/y as a rewrite already (like programming language nerds). Others don't, and it makes sense to me to use a more intuitive, directed symbol to denote the action. FWIW, `>` has not one but many meanings across programming languages.
- entaloneralie 2y agoBecause the denumerator is to the left side.