Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Probably in order to be consistent with assignment.


Which is really the odd ball. In a left-to-right language, it's sort of bizarre that we don't write `4 = x' since the rvalue tends to be the more complicated part of the expression.

The curious bit is, AT&T assembly syntax does follow this convention so you'll see something like `mov $5, ax'.


Indeed. Assignment should really look like something like this this:

  expression -> variable;


Forth uses

  expression memory-location !
to store and

  memory-location @
to read.


I think it's more to do with the requirement that mandatory arguments have to go before optional ones (it wouldn't work the other way round).


In strcpy, memcpy and partners, both arguments are (rather obviously) mandatory...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: