Content deleted Content added
→Criticism: rephrase to eliminate weasel words: { numerically vague expression, passive voice } |
m Bot: links syntax and spacing |
||
Line 5:
==Criticism==
Critics<!--[[Assignment_(computer_science)#Assignment_versus_equality|Assignment versus equality]]</ref><ref>[[Relational_operator#Confusion_with_assignment_operators|Confusion with assignment operators]]</ref>-->, including language designers,<ref>[http://java.sun.com/docs/codeconv/html/CodeConventions.doc9.html#547 Java Code Conventions "10.4 Variable Assignments"]</ref> blame expression-orientation for an entire class of [[software bug|programming mistake]] wherein a programmer introduces an [[Assignment_(computer_science)|assignment expression]] where they meant to test for [[Equality_(relational_operator)|equality]]. For example, the designers of [[Ada_(programming_language)|Ada]] and [[Java_(programming_language)|Java]] were so worried about this type of mistake, they restricted [[Conditional_(programming)|control expressions]] to those that evaluate strictly to the [[
However, [[notation]] provokes such errors, not [[semantics]]. From the perspective of expression-orientation, the choice of [[Assignment_(computer_science)|assignment notation]] made by [[Curly_bracket_programming_language|C-style languages]], the [[equals sign]], <code>=</code>, can be considered a poor choice due to the equals sign's similarity to, and hazardously small [[Typing#Minimum_string_distance_error_rate|typing distance]]<ref group="nb" name="distance">In fact, considering the automatic repetition feature of [[Keyboard_(computing)|typical computer keyboards]], the [[Typing#Minimum_string_distance_error_rate|minimum string distance]] between <code>[[Assignment_(computer_science)|=]]</code> and <code>[[Equality_(relational_operator)#Equality|==]]</code> is effectively zero, the ''worst possible'' collision.</ref> from the notation C-style languages choose for the equality operator, <code>==</code>, make it an occasion for error. The expression-ness of assignment is not the root cause. Other language families make different notational choices for assignment<ref>{{Cite web
|