forthmath icon indicating copy to clipboard operation
forthmath copied to clipboard

Improve stack effect notation?

Open frno7 opened this issue 8 years ago • 0 comments

Standard stack effect notation with suffixed types is somewhat undescriptive and less readable than desired. For example, the standard declaration of the extended Euclidean algorithm is:

\ Extended greatest common divisor.  Bézout’s identity n1·n3 + n2·n4 = n5 holds.
: extended-gcd ( n1 n2 -- n3 n4 n5 )

Can the parameter names be improved in some standard way? For example (nonstandard):

\ Extended greatest common divisor. Bézout’s identity p·m + q·n = d holds.
: extended-gcd ( p q -- m n d )

frno7 avatar Jun 11 '17 08:06 frno7