Useless instructions: Difference between revisions

J
(Applesoft BASIC)
(J)
Line 241:
map[0:{}]
</pre>
 
=={{header|J}}==
 
Here, we will focus on J's verb <code>>:</code>. This has two meanings, and both of them are redundant within the language.
 
First, <code>X &gt;: Y</code> tests whether X is greater than or equal to Y. And, J has several other ways of accomplishing this same task. For example, if X is greater than or equal to Y, then Y is less than or equal to X, so an equivalent expression would be <code>Y &lt;: X</code>. Another approach would be to test that X is not less than Y, which might be expressed as <code> -.X &lt; Y</code>
 
Second, <code>>: Y</code> increments the value obtained from Y (it does not modify Y). And, J also has several other ways of accomplishing this task. For example: <code>1+Y</code>. Or, we could express this in polynomial form as <code>1 1 p. Y</code>, or we could subtract negative 1. Etc.
 
J has many other equally useless instructions, of course.
 
=={{header|jq}}==
6,951

edits