From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed1.bredband.com!bredband!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp,comp.lang.scheme,comp.lang.functional Subject: Re: Macros in Common Lisp, Scheme, and other languages Date: 07 Sep 2002 18:57:11 +0000 Organization: Naggum Software, Oslo, Norway Lines: 29 Message-ID: <3240413831552310@naggum.no> References: <7ed8f64d.0209050301.66c34a92@posting.google.com> <3D783A89.C886BF0F@his.com> <3240318776815077@naggum.no> <6db3f637.0209061838.47bb9d0b@posting.google.com> <3240361769031272@naggum.no> <3D79E7CD.FE72D279@dls.net> <3240405843026883@naggum.no> <3D7A3AEB.487CDEBD@dls.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: maud.ifi.uio.no 1031425051 14548 129.240.64.16 (7 Sep 2002 18:57:31 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 7 Sep 2002 18:57:31 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:39975 comp.lang.scheme:14072 comp.lang.functional:12859 * Paul F. Dietz | I understand this. Sorry, that not clear to me from what you wrote. | The current scheme makes it hard for the user to do some things that the | compiler can do. Precisely, but there are different ways to accomplish this. If the compiler knows the type, you can let the macro expand to a `type-caseĀ“ form that the compiler should optimize away. If the compiler cannot optimize it away, it will be a run-time decision, instead, which may bloat the code but should yield nearly the same performance benefits. | I realize that macros can expand to arbitrary code. My suggestion was to | allow some way for the user to provide a hint to the system so it can | propagate information through unexpanded macros. Perhaps this could be | limited to compiler macros, which should be written to reflect the semantics | of the equivalently named functions anyway. I think macros are used where compiler-macros should be used mainly because the programmer does not know about compiler-macros. For some reason, they are not covered in many Common Lisp texts. -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.