Read Time Is Not Eval Time

Table of Contents

A draft for the proposal shelf. Not submitted anywhere. Status: New, from the review.

1. Pitch

(progn (in-package :a) (defun f …)) defines f in the wrong package, silently.

2. Abstract

The reader interns every symbol in a form before any of it is evaluated, so an in-package inside a progn arrives too late. There is no error, only a plausible wrong result. Old hands know this. What is new is that any tool which sends whole forms to a Lisp on an agent's behalf walks into it. Three REPL lines, and the fix: bind *package* before the read.

3. Audience, format, venue

Audience
Common Lisp users and tool builders.
Format
5-minute lightning.
Where
ELS lightning, Boston Lisp.

4. Review

Proposed by the presentation review as the right size for an ELS lightning slot. The behaviour is recorded as verified in the note above. The code it came from is not public, so this is the concept only. The risk is that the room already knows; the agent-tooling angle has to be the news.

5. Backing

Public repositories:

  • None public. Concept only.

Notes on this site: