Return of the Lisp Machine package system features

Xach pointed out that Nikodemus Siivola recently added support for reading package::(arbitrary form) in SBCL.

I had heard that Zetalisp had this feature, but apparently it's older than that — this was how packages originally worked. The 1979 Lisp Machine manual says:

The colon character (":") has a special meaning to the Lisp reader. When the reader sees a colon preceded by the name of a package, it will read in the next Lisp object with package bound to that package.

I don't know why CL degeneralized the package prefix to only work on symbols. The only reason I've heard is that a misplaced colon could accidentally cause the next form to be read in the wrong package, but that doesn't sound more dangerous than other typos like stray parentheses.

Update August 2015: It's more dangerous because unlike most typos, it has a read-time side effect: it pollutes the other package with lots of unwanted symbols.

Old Lisp manuals are a fascinating mix of futuristic and primitive. Lisp Machine Lisp also had hierarchical packages: package names were symbols, not strings, and could therefore live in other packages. But there are no earmuffs on package, nor on any other special variables; apparently they hadn't been invented yet.

2 comments:

  1. I bought this copy of alexander mcqueen shoes and clothes from this store.cheap alexander mcqueen The quality is very good. It has been repurchased many times. I recommend it to friends around me.cheap kids alexander mcqueen They all praise the quality of the shoes and the service attitude of the store.

    ReplyDelete
  2. top quality uk replica watches, combining elegant style and cutting-edge technology, a variety of styles of replica omega watches, the pointer walks between your exclusive taste style.

    ReplyDelete

It's OK to comment on old posts.