home *** CD-ROM | disk | FTP | other *** search
- Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!ea08+
- Newsgroups: comp.lang.functional
- Message-ID: <0fACPi200VQw41LfpV@andrew.cmu.edu>
- Date: Thu, 17 Dec 1992 15:45:34 -0500
- From: "Eric A. Anderson" <eanders+@CMU.EDU>
- Subject: Re: Values escaping their type definition
- In-Reply-To: <BzDIL1.B4I@cs.uiuc.edu>
- References: <BzDIL1.B4I@cs.uiuc.edu>
- Lines: 25
-
- morrison@cs.uiuc.edu (Vance Morrison) writes:
- > The oddity is that a value can escape the scope in which its type
- > definition was made. Thus
- >
- > let
- > datatype aType = constA | constB of int;
- > in
- > constA
- > end;
- [ Gives ?.aType as a type.]
- From what I recall, this isn't a really big problem because you can't
- do anything with those values. This occurs in a similar and possible
- more obnoxious way with exceptions, I think you can look that up in
- the SML manual, I know it's discussed somewhere.
- This problem can also occur with recursive types and stuff like that.
- It doesn't break the typechecking of the system, and I don't think it
- causes any substantial semantical problems since you can't operate on
- the values anymore.
- -Eric
- *********************************************************
- "Overhead, without any fuss, the stars were going out."
- -The Nine Billion Names of God
- "Yes, you're very smart. Shut up."
- -In "The Princess Bride"
- *********************************************************
-