| This post just made my BS-meter explode. How can this make the front page of HN? I don't even know where to start. It’s more important than ever for students to understand the difference between equal as a result and equivalence in meaning from a young age because it is a fundamental computer science concept (...) Equivalent means not only are they equal, they are also of the same data type. In other words, they mean the same thing. Except that this point is totally misguided because 5+5+5 and 3+3+3+3+3 are, in fact, the same thing. A member of the set of natural numbers, commonly known as 15, and that you can write as S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(0))))))))))))))) if you have the patience to do so. In fact, the author uses the == and === operators in JavaScript to illustrate his point, but of course, 5+5+5 === 3+3+3+3+3 resolves to true in Javascript, and in any language under the sun that compares stuff by value. And then, if you compare by reference, the result of == or similar operators doesn't depend at all on whether you made your integer by adding up three fives or five threes: in Java, Integer i1 = new Integer(5+5+5);
Integer i2 = new Integer(3+3+3+3+3);
Integer i3 = new Integer(3+3+3+3+3);
System.out.println(i1==i2 + " and " + i2==i3);
prints false and false, while using equals instead of == would print true and true.So I don't see how this nonsense would teach kids anything useful about computer science. The only thing it can do is confuse them. equivalent is defined as, “equal in value, amount, function, or meaning.”
In the above problem 5 x 3 is equal to 5 + 5 + 5, but they’re not necessarily equivalent. Equivalence relates to meaning, so it depends on the meaning of multiplication, as the directions indicate. First of all, the sign in the exam statement is an equal sign, not an equivalence sign. So if 15 is equal to 5x3, what the student wrote is perfectly fine. Also, "solving" a multiplication means finding out its value, which is what he did. Secondly, you know what also is a fundamental computer science concept? The logical operation "or". The definition of "equivalent" in the blog is reported as “equal in value, amount, function, or meaning.” "Or", not "and". So the definition doesn't say anything about equality in meaning (however you define it) being a necessary condition for equivalence. Maybe teachers are "experts on child education" but that doesn't exempt them from knowing something about maths if they are supposed to teach them. |