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

Re: Issue: DECLARE-TYPE-FREE (Version 9)



    Date: 2 Jan 89 22:12 PST
    From: masinter.pa@Xerox.COM

    ...
    If I say (DECLARE (TYPE (SIGNED-BYTE 12) X)), I'd think I'd like it to mean
    that X never even momentarily holds a value that isn't of the declared
    type.
    ...

The problems I have with this are the following:

 - It isn't enforceable.

 - In exactly those cases where it is enforceable, it's useful to enforce.
   In those case where it is not enforceable (the odd middle-ground cases
   in the Examples), it doesn't help you any to enforce the restriction, and
   it might get in your way. 

   Put another way: If you grant that a language could be internally 
   consistent, well-formed, and all that sort of thing with the LEXICAL
   proposal, then why not attach a useful meaning to the middle ground case?
   There are potentially useful things (mostly "patches") that you could
   write that way, and even if you permit it, you don't hinder the compiler's
   ability to make useful inferences.

 - My general rule of thumb is that if someone says they need a feature
   and someone else says they don't, that the person claiming they do need
   the feature has an a priori more interesting case. As such, LEXICAL is
   more interesting partly because the fact that some people don't need all
   its features is not a compelling thing to me. If you could make a case for
   why LEXICAL caused some actual -problem-, that would make the other case
   more interesting. After all, nothing about LEXICAL prevents you personally
   from meaning that "X never momentarily holds..." since that's compatible
   with the meaning proposed in LEXICAL -- just as nothing about the way 
   false and the empty-list are treated in Lisp keeps you from meaning
   that () always means the empty list (even if Lisp doesn't care).
   Similarly here, LEXICAL admits both views of the universe while ALLOW
   admits only one. To me, this seems unfair, since ALLOW restricts things
   to lock out a view of the world, without providing any hint of a reason
   for why that view of the world is an unreasonable one.