3 ms·
> Traditional math notation has a lot problems. Inconsistencies and ambiguities. It lacks a grammar. It doesn't require a grammar, because it is interpreted by
by mcphage 9y ago
> Traditional math notation has a lot problems. Inconsistencies and ambiguities. It lacks a grammar.
It doesn't require a grammar, because it is interpreted by humans, not parsed by a computer.
Ambiguity is a major problem in computer languages. It is not so in human languages—human languages are riddled with ambiguity from start to finish. But they've also been developed over a period of hundreds of years to assist human communication.
Math is written for humans to read. Programs are written for computers to read. What's good for one, is very bad for the other. Don't confuse the two—computers are very precise, and very stupid. Humans are very smart up to a point, but no further. Their needs are very different.
- fuck_google 9y agoBy your reasoning human languages shouldn't have grammar either, because its not needed by humans that can just guess what you are trying to say.
- llamaz 9y agoI agree. I find that it's easier to read and write math when the notation is ambiguous, but clear in a context shared by both the reader and writer. Even in the english language, it's up to the author to gauge the audience and decide how ambiguous they want to make their sentence. If you want to be fully precise you end up with sentences like "for every epsilon greater than zero there exists a delta greater than zero such that for all x if the difference between x and y is less than zero then the difference between f(x) and f(y) is less than epsilon". The author is prematurely optimizing math - is Leibniz notation _really_ going to cause problems, or ambiguity with the meaning of parenthesis. Out of all the things that cause me difficulties with math, notation is the least significant. If notation _is_ a problem, then that means that I don't know what I'm doing. If you really need to be specific, there are plenty of ways to do so using the English language.
- swiley 9y agoMath definitely has a grammar. In upper level classes and in papers mathematicians even use correct punctuation. It's all very much just an extension of human language, just like you said.
- weberc2 9y agoPrograms are written for computers AND humans, and much ado goes into optimizing programming languages for human consumption. Interestingly, I don't think they are tending toward something that looks like math notation.
- marssaxman 9y ago> Math is written for humans to read. Programs are written for computers to read. What's good for one, is very bad for the other. If programs were written for computers to read, we would still be writing them in machine language. Quite the contrary - programming language design is to a large degree a human-interface problem, because programs are primarily written to be read by humans: our teammates, our successors, even ourselves, coming back to the project after working on something else. The existence of Brainfuck demonstrates that computers are indifferent to the qualities which make a programming language useful or legible to humans. The irony in your comment that "math is written for humans to read" is that I find traditional math notation to be practically illegible. I typically cannot make any sense out of the pseudocode in a CS paper until it has been translated out of traditional math notation into some more familiar, programming-language-style notation.
- Grustaf 9y ago> I typically cannot make any sense The operative word here is "I" And computer languages are obviously designed to be understandable by both humans and computers, but it is still the human that has to bend to the ways of the computer.
- posterboy 9y ago> but it is still the human that has to bend to the ways of the ... ... elder programmers. who would be called computers in olde times. The real problem is symbolism, though it's necessary, because only in symbols can we express a wrong statement, while on the other hand you can't take an apple and another apple and have three in the end.
- posterboy 9y agoTo employ a metaphor, brainfuck is so close to a turing machine, it is the computer. At least, a general purpose computing machine without program is not a complete computer. On the upside, the machine definition is perfectly readable, because it's so simple.