CL-CONCAT

Top-level Files of tip
Login

Top-level Files of tip

Files in the top-level directory from the latest check-in


CL-CONCAT

Concatenative programming in Common Lisp

cl-concat brings the conciseness of the concatenative paradigm to Common Lisp.

Glean an overview of the system from:

Features already implemented

Features planned

Idiosyncrasies

Subtraction is backwards

In most concatenative languages, the input line 7 4 - . yields 3. Then readers can more naturally subvocalize "7 minus 4".

Not so in concat. Concat, which uses postfix notation, tries to meld as seamlessly as it can with Common Lisp, which uses prefix notation. For consistency, concat represents Lisp functions and their arguments as the usual Lisp forms in reverse.

So subtraction feels a bit backwards. The builtin negate multiplies a number by -1 and can be used unambiguously:

In Common Lisp, - does this when given one argument. Concat requires fixed-arity functions, and it already assigns - arity 2.