From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news2.kpn.net!news.kpn.net!nslave.kpnqwest.net!nloc.kpnqwest.net!nmaster.kpnqwest.net!nreader2.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: The history of print, prin1, and princ? Mail-Copies-To: never From: Erik Naggum Message-ID: <3216868380267773@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 09 Dec 2001 06:33:02 GMT X-Complaints-To: newsmaster@KPNQwest.no X-Trace: nreader2.kpnqwest.net 1007879582 193.71.66.49 (Sun, 09 Dec 2001 07:33:02 MET) NNTP-Posting-Date: Sun, 09 Dec 2001 07:33:02 MET Xref: archiver1.google.com comp.lang.lisp:22119 When teaching Common Lisp to a friend, a whole lot of interesting questions have come up, about half of which I have been able to answer right away, and the rest requiring quite a bit of research -- probably the best reward a teacher can get. However, I am stumped for answers to both the name and functionality of the print family of functions. Why does print terminate with a space? (Starting with a newline is an obvious feature, and is not questioend. :) What functionality need does or did this fill? Do people avoid print because of this? (In Lisp 1.5, print prints one S-expression on a line or punch card.) How did the name "prin1" arise? In Lisp 1.5, prin1 prints an atomic symbol, only, not an S-expression. In Common Lisp, it not only takes an S-expression, but exists in a prin1-to-string version, as well, while print does not have a print-to-string version. And where did the name "princ" come from? It is not equally ancient as the other functions, but also has a corresponding princ-to-string version. For now, I have recommended write, write-to-string, and format instead of the print family, but as names, print-object and print-unreadable-object still hang around despite not producing delimiters associated with print. /// -- The past is not more important than the future, despite what your culture has taught you. Your future observations, conclusions, and beliefs are more important to you than those in your past ever will be. The world is changing so fast the balance between the past and the future has shifted.