[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PUSH: More silly arguments

For once I agree completely Kent Pitman.

There is a very popular, very good convention that the "object" being
operated is always the first argument of a function.  Large numbers of
people follow this convention, in many different programming languages
(Lisps, Ada, Mesa, Clu, C, Fortran, ...).  Some langauges such as Smalltalk
enforce this convention.  Even the TOPS-20 system calls tend to obey this
convention (e.g. AC1 always gets the JFN, for file operations).  In the
literature on formal progamming methodology, stacks have been the
traditional toy examples, and almost always the stack is the first operand
of PUSH and POP.

This convention stems from the so-called object-oriented methodology,
which, as a general methodology, has proved extremely useful and powerful.
The number of people who swear by the object-oriented approach is very
large.  For languages that don't provide explicit support for
object-oriented programming (T and LM Lisp have only go halfway), the
conventions are a real aid to clear programming.

Arguing that the value being pushed on the stack should be the first
operand because "that's how we say it in English" is very weak compared
to the advantages of good programming conventions.