[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SETF-FUNCTION-VS-MACRO (Version 1)



    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