From ... From: Erik Naggum Subject: Re: LOOP and patterns (Re: Hash to list?) Date: 1999/12/13 Message-ID: <3154094846488075@naggum.no>#1/1 X-Deja-AN: 560150729 References: <87k8mo9is1.fsf@senstation.vvf.fi> <2hbt80kpij.fsf@dslab7.cs.uit.no> <3153828708572466_-_@naggum.no> <2hd7scj56p.fsf@dslab7.cs.uit.no> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 945106046 7155 195.0.192.66 (13 Dec 1999 17:27:26 GMT) Organization: Naggum Software; +47 8800 8879 or +1 510 435 8604; fax: +47 2210 9077; http://www.naggum.no User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 13 Dec 1999 17:27:26 GMT Newsgroups: comp.lang.lisp * Frode Vatvedt Fjeld | Well, I disagree with you here. I think "(hash-table-list x)" is a lot | more readable (and not the least bit weird) than the loop expression, | which I find about equally readable to the "plain" lisp form. And, more | importantly, the time-to-convince-me-it's-correct factor is also much | better. well, I would _not_ understand what a function called HASH-TABLE-LIST was doing without reading its documentation or source code, and that I would have to repeat every time I found it in a new package or project. the reason is quite simple: there are so many lists that could be generated from hash tables that none of them merit being the only one thus named. | I'm a bit confused: My impression after reading OnLisp and other books is | that I'm encouraged to write and use precisely this kind of "utilities". | Do you disagree with this? actually, yes. naming utility functions is a very hard problem, and they should therefore not be multiplied lightly. when there is clearly a diversity of needs, it is better to be a little more verbose than to pollute the name space with thousands of functions. the C++ way to do this is to talk about patterns to discourage people from creating tons of one-call functions. the Lisp way is to create sub-languages and macros that cover _multiple_ needs well. I actually think LOOP succeeds in this, but it suffers in my view from not creating an environment with local macros instead of the positional "lexical keyword" stuff that I have come to dislike in other languages. #:Erik