5 ms·
> Without, conformance tests different interpretations of a spec lead to divergent behavior. I think you mean either: > Without conformance tests incorrect in
by th 14y ago
> Without, conformance tests different interpretations of a spec lead to divergent behavior.
I think you mean either:
> Without conformance tests incorrect interpretations of a spec lead to divergent behavior
Or
> Without conformance tests different interpretations of an ambiguous spec lead to divergent behavior.
Conformance tests should test specific behavior defined in the spec. Tests will never (or rarely) prove spec conformance but spec conformance should always prove test conformance.
- lmm 14y agoI have yet to encounter a spec that was not in some way ambiguous.
- jjr 14y ago1 + 1 = 2 Is fairly unambiguous until you introduce operator overloading (and why i despise overloading).
- nollidge 14y agoOverloading is a feature of natural language though, and therefore completely unavoidable in writing a spec.
- JadeNB 14y ago> 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."
- _pferreir_ 14y ago> 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>
- cynicalkane 14y agoIs 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.)
- ramses0 14y ago1 + 1 = 10b is what he's saying.
- _pferreir_ 14y agoYes, that's what I meant - even "1 + 1 = 2" can be ambiguous if no context is provided.
- josch 14y agoNot 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.
- richbradshaw 14y ago1 + 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.
- Dylan16807 14y agoThat'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.
- anthonyb 14y agoHee hee, your interpretation of his sentence is introducing ambiguities :)