This does raise the question: which languages other than AT&T assembly put the value first?
Re:Rewrite Linux Kernel in Rust?
by AstralStorm on Sunday June 04, 2017 @01:13AM
(#14479996)
AT&T syntax puts the operator first, not the value.
AT&T is Verb Subject Object.
Intel is alien Verb Object Subject.
Many kinds of S expressions result in similar code. That would mean Lisp derivatives.
Re:Rewrite Linux Kernel in Rust?
by tom_mellior on Sunday June 04, 2017 @05:55AM
(#14480600)
> AT&T syntax puts the operator first, not the value.
If "operator" has any meaning in assembly language, it would have to refer to the opcode. Both variants have the opcode (mov/movl) first.
> AT&T is Verb Subject Object. Intel is alien Verb Object Subject.
Both "move 5 into EAX" and "move into EAX the value 5" are imperatives. Neither of them has a subject, or more precisely, the subject is omitted (https://en.wikipedia.org/wiki/Imperative_mood). In both of these, 5 is an object. "into EAX" is an adverbial phrase or something.
It's true that one sounds more alien than the other when forcibly translated to English. Then again, assembly language is not English, so that's neither here nor there.
There is no special precedence that should be applied to C. Similarity to C only imparts benefits to those that are fimilar with C-like languages or variants that follow that structure. That ends up being a lot of people because of how popular C and variants have been, but that's doesn't inherently make it better.
It's sort of a pet peeve of mine when people point out differences from C as problems without any objective facts to back up whether it actually is more or less useful in some aspects. If we never stood up to that type of thinking, we'd all by much poorer in the programming language department.