the order of arguments
stevan apter — 2000-06-19 22:48:56
fellow concatenators:
in joy:
joy>5 3 -
2
but as i've implemented the primitives in conk:
k>5 3 -
-2
i prefer the conk interpretation, since [3 -] is then the program which
subtracts the item on the top of the stack from 3, which seems more natural
than the program which subtracts 3 from the top of the stack.
this holds for division, >, <, >=, and <=. i can't think of any others
offhand.
this wasn't intentional, except insofar as i want the conk primitives
to be mapped by one rule to the k primitives. if i reverse the arguments
of -, then i would have to do that everywhere, and the resulting set of
primitives is extremely cumbersome.
unfortunately, it means that several of manfred's joy programs won't run
without a bit of surgery. (i discovered this the hard way, thinking that
my implementation of condlinrec must be wrong, since none of the examples
would run!)
any opinions?
--
ps: the latest version can be found at www.kx.com/technical/contribs/stevan.