Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

What was the first programming environment (probably language) to use the words "boxing" and "unboxing" to indicate encapsulating a primitive type in some kind of wrapper to allow it to be used in more object-y contexts? (Or something like it.)

(I recently noticed that "boxing" is a very critical concept in the J programming language, and so I suspect it may be from APL. A coworker of mine thinks it might be from LISP.)


migration rejected from Sep 6 '13 at 7:23

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Robert Harvey, Corbin March, MichaelT, gnat, mattnz Sep 6 '13 at 7:23

  • This question does not appear to be about software development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about word etymology. You might find help at – Robert Harvey Sep 5 '13 at 17:00

1 Answer 1

up vote 14 down vote accepted

APL (and derivatives such as J) have boxing. J has two monadic operators < and > called 'enclose'/'box', and 'disclose'/'unbox'. I'm not sure when it was introduced.

Usenet is often a good place to find things like this:

Here is a reference to boxing in Prolog from 1988.

Here is a reference to boxing in Lisp from 1984.

Everything prior to this points to Lisp as the origin of the term.

Performance and Evaluation of Lisp Systems (1985) discusses boxing.

(Interestingly, 'lisp boxing' is hard to search for, as apparently boxers (the people) often develop one.)

The TXDT Package - Interlisp Text Editing Primitives (1981) mentions it.

CSL 76-5, The Interlisp Virtual Machine specification (1976) uses it liberally.

The BBN-LISP system (1969) uses the term, but a previous document The BBN-LISP system (Feb 1966) doesn't. A document from later that year, Preliminary Specifications for BBN 940 LISP (Oct 1966) does.

I think that Basic PDP-1 Lisp (the predecessor of BBN Lisp) includes the required functions (see this book) to implement boxing/unboxing (LOC/VAG), but they don't appear to be used to do this.

Other Lisps (e.g. MacLisp) use similar techniques, but the word itself seems to have appeared somewhere in the Basic PDP-1 – BBN-Lisp – Interlisp lineage.

Great answer! StackExchange at its best. – Jörg W Mittag Jan 16 '12 at 12:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.