[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Chapter 1 and 2 Last Chance Review
- To: "Sonya E. Keene" <skeene%STONY-BROOK.SCRC.Symbolics.COM@multimax>
- Subject: Re: Chapter 1 and 2 Last Chance Review
- From: Dan L. Pierson <pierson%mist@multimax.ARPA>
- Date: Wed, 13 Apr 88 17:36:10 EDT
- Cc: common-lisp-object-system%sail.stanford.edu@MULTIMAX.ARPA
- In-reply-to: Your message of Wed, 13 Apr 88 17:12:00 -0400. <19880413211239.3.SKEENE@JUNCO.SCRC.Symbolics.COM>
(2) Calls from outside the package may store incorrect
types (so even if your portable code is self-consistent
you could wind up with undetected type errors).
I don't know what you mean by (2).
Let's say you're implementing a window system which has slots
WINDOW-WIDTH and WINDOW-HEIGHT. You define these slots to be of type
integer *and* ensure that your code never puts a non-integer in them.
You still have to explicitly check the type of the slot value every
time any code that you didn't write could have run because a user
program could have put a non-integer in the slot without getting an
error in some implementations.