Re:The Future of Markdown
by jjr on Friday October 26, 2012 @08:20AM
(#4701843)
1 + 1 = 2
Is fairly unambiguous until you introduce operator overloading (and why i despise overloading).
[ Parent
| on HN ]
Re:The Future of Markdown
by _pferreir_ on Saturday October 27, 2012 @04:45AM
(#4705753)
> 1 + 1 = 2 Is fairly unambiguous until you introduce operator overloading (and why i despise overloading).
It is only unambiguous if you specify the numbering system you are using ;)
</pedantic>
Re:The Future of Markdown
by cynicalkane on Saturday October 27, 2012 @12:06PM
(#4706412)
Is there actually a notation and + operator for which 1 + 1 = 2 is ambiguous? Only being semi-rhetorical, I'd be interested to know if there is one. (Modular arithmetic is not considered ambiguous, at least not in the math neck of the woods.)
Not really answering your question, but more to the point of the discussion in my opinion, a() + b() could be ambiguous if a() and b() are functions with side effects and the evaluation order of the +-operator is not specified.
1 + 1 = 10b is what he's saying.
Re:The Future of Markdown
by _pferreir_ on Monday October 29, 2012 @02:34PM
(#4713732)
Yes, that's what I meant - even "1 + 1 = 2" can be ambiguous if no context is provided.
> 1 + 1 = 2 Is fairly unambiguous until you introduce operator overloading (and why i despise overloading).
What is it specifying—or, perhaps a better question, what would an implementation look like? It might be more precise to say "I have yet to encounter an implemented spec that was not in some way ambiguous."
Re:The Future of Markdown
by richbradshaw on Saturday October 27, 2012 @05:13PM
(#4707262)
1 + 1 != 2 if the 1s are magnitudes of vectors - if the directions are opposite, then they can be 0. In fact, 0 <= 1 + 1 <= 2 in that system.
Re:The Future of Markdown
by Dylan16807 on Wednesday October 31, 2012 @02:31PM
(#4724364)
That's not how addition works. You're either adding the vectors or you're adding the magnitudes. You don't get to sleight of hand by writing one and adding the other.