Talk:Useless instructions: Difference between revisions

(Meaning of useless in English)
 
Line 13:
==Meaning of useless in English==
The meaning of useless is not as used in the task description. According to oed the formal meaning is "Not fulfilling or not expected to achieve the intended purpose or desired outcome". In what way does 'if true then ... else ...' mot achieve the intended or desired outcome? The task description says "Showcase an instruction or function built into the language, that is made redundant by another instruction also built into the language". In F# there are a number of operators built in because they are in the ML language specification but are replaced in F# by preferred operators. In ML the string concatenation operator is ^, you could write "Nigel "^"Galloway" in F# and the result would be string concatenation as expected, but in F# it would be attract disapprobation not to write "Nigel "+"Galloway". This seems closer to what the task description asks for.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:59, 25 March 2022 (UTC)
 
:One thought that struck me is <code>x = x</code>. It could do nothing, it could prove x is not unassigned, it could be an expression that fails to work as expected for or proves it is NaN, and even, as <code>x := x</code> in Phix parameter passing, the two x could refer to two different things. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 04:04, 26 March 2022 (UTC)
7,806

edits