Safe and Unsafe Calls (original) (raw)

ANSI Common Lisp 3 Evaluation and Compilation 3.5 Error Checking in Function Calls 3.5.1 Argument Mismatch Detection

3.5.1.1 Safe and Unsafe Calls

A call is a safe call if each of the following is either safe code or system code (other than_system code_ that results from macro expansion of programmer code):

The following special cases require some elaboration:

An unsafe call is a call that is not a safe call.

The informal intent is that the programmer can rely on a _call_to be safe, even when system code is involved, if all reasonable steps have been taken to ensure that the call is safe. For example, if a programmer calls mapcar from safe code and supplies a function that was _compiled_as safe, the implementation is required to ensure thatmapcar makes a safe call as well.

3.5.1.1.1 Error Detection Time in Safe Calls