Re: lookup-def
Andy Wingo <[email protected]> Sun, 17 Oct 2004 20:56:47 +0200
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Message-ID | <1098039407.4178.72.camel@localhost> |
Hi Oleg, A late reply. On Fri, 2004-09-10 at 22:24 -0700, [email protected] wrote: > The procedures lookup-def and assq-def are quite frequent. The former > is, unfortunately, defined and redefined in lots of places, sometimes > with slightly different interfaces. Standardization is indeed in order. > It seems that the following interface is a good compromise. Looks good. I write these things all the time myself, and this definition seems to take into account all the cases I normally use. BTW, I did get guile-lib's packaging of ssax to use R5RS macros for (sxml ssax), but defmacros for (sxml simple). Seems to have worked out well, thanks for the hints. It's stupid, but I feel uncomfortable with the fact that lookup-def is a syntax. You could get all of the functionality with a regular procedure, with the extension that if the default-value is a thunk it would be executed. I don't know why I feel that way. Probably because I mainly hack guile, and it doesn't have a canonical compiler, which makes syncase slow to load and makes macros less advantageous speed-wise. But I'll pull this in as a (sxml tools) guile module, I guess. (I hope those R6RS folks can standardize on a module system..) Cheers, -- Andy Wingo <[email protected]> http://ambient.2y.net/wingo/ ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl