Content deleted Content added
Line 13:
The designers of [[Ada (programming language)|Ada]] and [[Java (programming language)|Java]] prevent this type of mistake by restricting [[conditional (computer programming)|control expressions]] to those that evaluate strictly to the [[boolean data type]].<ref>[https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.9 The Java Language Specification, Java SE 8 Edition "14.9 The if Statement"]</ref><ref>[https://www.adaic.org/learn/materials/intro/part4/ Introducing Ada]</ref>
The designers of [[Python (programming language)|Python]] implemented assignment as a statement rather than an expression, thus prohibiting assignment from nesting inside any other statement or expression.<ref>[https://docs.python.org/3/reference/simple_stmts.html#assignment The Python Language Reference "6.2. Assignment statements"]</ref> (Until version 3.8 added 'assignment expressions', with a different syntax.<ref>[https://www.python.org/dev/peps/pep-0572/]</ref>)
In some expression-oriented languages, expressions that merely cause [[side effect (computer science)|side effects]] return [[void type]]s.
|