Subject: Re: realistic but short and simple LISP examples? From: Erik Naggum <erik@naggum.net> Date: Sat, 15 Dec 2001 19:48:12 GMT Newsgroups: comp.lang.lisp Message-ID: <3217434489399498@naggum.net> * Wroot <wroot@my-deja.com> | I'm trying to understand what it is that people like about LISP and | whether I should learn it. (I'm interested in AI) After you have written and debugged and deployed several hundred thousand lines of code in languages X, Y, and Z, and then find yourself shouting "there's _got_ to be a better way than this!", Common Lisp replies "you called, master?" What I like about Common Lisp is that it takes care of 90% of the boring details for me that I have had to deal with in every other language I have used. Lisp is all about this delivery from tedium. (Hence, Scheme is not a Lisp in my view.) Incidentally, "LISP" is generally taken to be the pre-1980 typewritten manuscript rendition of the small caps tradition that was used to print acronyms nicely and without making them stand out like sore thumbs from the page. This tradition has largely been superseded by initial caps and the rest lowercased. So what an HTML-based author would write as <small>LISP</small> is now just Lisp. You date yourself (or your sources) back at least 20 years when you write it in all caps. Even Fortran and Cobol are written like words, now. | Could somebody offer an example of a short (a few Kb or less) program in | LISP that does something useful and that would be relatively hard and | time-consuming to program in C++? (aside from such built-in niceties as | arbitrary-precision arithmetic please) The real niceties are invisible to C++ programmers, because they would no more look for them than an illeterate would consult encyclopedia to learn. It is impossible to see certain things until you have been alerted to their existence, and such alerts cause too much cognitive dissonance among people who do not believe it can exist to work without experience. The way to get into this is just to read textbooks and the specification and to experiment with unexpected concepts. Small examples will largely not work, because most of the features work best with larger projects. Anybody can create small nice things. Creating large nice things takes a different approach entirely. Common Lisp excels at the latter, sometimes regarded as a problem since most programmers start off with exceptionally small things and think they can grow a small cottage into a skyscraper simply by scaling it up and adding stuff to it. This is not to say that Common Lisp does not have its share of small programs that do useful things, but every time someone tries to answer such a question, C++ people crawl out of the woodwork to show that they can do it, too, like some paranoid and hypercompetitive athlete afraid that someone, somewhere, is good at something. Language comparisons are largely only annoying. Better learn the new language. Yes, you should learn Common Lisp. (Do not bother wasting your time on Scheme.) /// -- 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.