[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SETF-FUNCTION-VS-MACRO (Version 1)
- To: "David A. Moon" <Moon@SCRC-STONY-BROOK.ARPA>
- Subject: SETF-FUNCTION-VS-MACRO (Version 1)
- From: "Scott E. Fahlman" <Fahlman@C.CS.CMU.EDU>
- Date: Sun, 25 Oct 1987 19:50 EST
- Cc: CL-Cleanup@SAIL.STANFORD.EDU
- In-reply-to: Msg of 23 Oct 1987 18:14-EDT from David A. Moon <Moon at STONY-BROOK.SCRC.Symbolics.COM>
- Sender: FAHLMAN@C.CS.CMU.EDU
What we're saying is that using setf functions instead of setf macros
wherever you can is good programming style. I think the analogy to regular
macros is compelling. In the old days people used to over-use macros,
or even worse fsubrs, where they could just as well have used functions;
eventually it was widely realized that this was a bad idea, and that
macros should only be used where you are actually trying to do syntax
extensions. This didn't mean macros were obsolete, it just meant that
people better understood when it was good programming style to use them.
Another reason for using macros is because you don't trust the inline
declaration to do its job in some implementations under some conditions.
Which reminds me, we might want to say explicitly that
(proclaim '(inline (setf foo))) is allowed.
-- Scott