Comment by treyd
6 days ago
I actually see the converse often with novices often, referring to statements (or even entire function decls) as "commands".
6 days ago
I actually see the converse often with novices often, referring to statements (or even entire function decls) as "commands".
"Command" is a better term for what we call "statements" in imperative programming languages. "Statement" in this context is an unfortunate historical term; except in Prolog, these "statements" don't have a truth-value, just an effect. (And in Prolog we call them "clauses" instead.)
True.
In many early computer programming documents the term "order" was used instead of "statement", where "order" was meant as a synonym for "command" and not as referring to the ordering of a sequence.
Occasionally, but much more often (as in Mauchly's cited paper) an "order" was a machine instruction, not a high-level language "statement".
9 replies →
Is it? "Statement", defined by the dictionary as "the expression of an idea or opinion through something other than words.", seems quite apt. Symbols may end up resembling words, which perhaps is your contention, but technically they are only symbols.
Best I can tell, all usable definitions surrounding "Command" seem to suggest an associated action, which isn't true of all statements in imperative programming.
> Best I can tell, all usable definitions surrounding "Command" seem to suggest an associated action, which isn't true of all statements in imperative programming.
The defining characteristic of a programming "statement" is that it can perform some action (even if not all of them do), whereas statements in the usual everyday sense are inert. So it's not a good term.
11 replies →
The requirement for a truth value is just from how math/logic uses the term.
Well, and linguistics. A "statement" in the grammatical sense is a sentence that is declarative in form (as opposed to, in English, interrogative, imperative, or exclamatory) and which thus ostensibly has a truth-value.