James A. Crippen wrote on Mon, Jan 13, 2003 at 11:31:51PM -0900: > Oh good, he knows Java, he won't be totally weirded out. People who > only know C-- as OO get really confused with Lisp in my experience. > > Be very patient as you explain the separation of Classes and Methods. > Particularly when you get to Generic Functions. This comes very hard > to people from the procedural world, I've found.
My opinion is that people should fall back to a structs'n'functions programming style when teaching Lisp to someone, and then introduce the beauty of Lisp via iteration constructs, scope, macros etc. destructuring-bind also comes in very handy to impress a pagan. CLOS is too heavyweight to be used like any of the class systems in Java or C++. These programmers will instantly ruin the performance of their systems. ITA's system doesn't use CLOS at all, and it is nontheless beautiful considering how much and how dense it does things. > Also urge them to resist explicit data typing -- although in the end > it's good for compilation it distracts the Lisp newbie from the > possibility that any random datum can be any type, and of the > flexibility this implies. I use data type declarations as assertions. New users have their systems compiled with max safety and every type declarations turns into an assertion. The great thing about CMUCL is that this even applies to declarations like "integer from 1 to 17 or 23". Of course, you just have to switch to fast compilation mode and get good speed out of the code. > > i'm pretty much out of touch with lisp books, i learned common lisp from > > the first edition of steele after a year of writing zetalisp. > > I'd recommend Paul Graham's _ANSI Common Lisp_ and _On Lisp_, and > Sonya Keene's _Object-Oriented Proramming in Common Lisp_ for study > books. For advanced study move on to Steele's _CLtL2_ and Kiczales > and Bobrow's (and someone else whom I've forgotten!) _The Art of the > Metaobject Protocol_. I don't use CLOS and as mentioned do not recommend it when teaching a Java or C++ programmer Lisp. You must be sure they get that this is a very high-level tool before you allow them to use it. I like Timothy Koschman's book for intro level and then the Lisp teaching parts of Peter Norvig's PAIP. I don't particularily like Graham's books. Strangely enough many of my officemates share this opinion. Martin
