[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Two functions for everything?
- To: SANDRA <LOOSEMORE@UTAH-20.ARPA>, common-lisp@SU-AI.ARPA
- Subject: Two functions for everything?
- From: David C. Plummer <DCP@QUABBIN.SCRC.Symbolics.COM>
- Date: Mon, 30 Jun 86 11:55 EDT
- In-reply-to: <12218956472.19.LOOSEMORE@UTAH-20.ARPA>
Date: Mon 30 Jun 86 08:52:34-MDT
From: SANDRA <LOOSEMORE@UTAH-20.ARPA>
From: DCP@QUABBIN.SCRC.Symbolics.COM (David C. Plummer)
This is bogus folks. All you need is two entrypoints: one which doesn't
check anything, and one which checks what it needs to. They then join.
Safety 0 (at compile time) causes functions to call the the
don't-check-anything entrypoint, and safety > 0 causes functions to call
the one that checks. Hell, you could have a different entrypoint for
each setting of safety.
Yeah, but where in CLtL do we provide a way to make functions with multiple
entry points? I certainly don't want to have to hand-code every single
function that does optional error checking in assembly language (or
whatever). The point I was trying to make was that, if we are serious
about making multiple levels of error checking part of the language, we
should also provide some high-level constructs for specifying what error
checking goes on when. Multiple entry points would be one way to implement
such a construct....
Why do you think CLtL has to specify how this is done? It is completely
in the domain of the implementation of the compiler, the linker and the
compiled function format. The only thing CLtL needs to specify is how
to get what you want, and I think it already has that with the safety