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

ports as real types...

   From: Pavel Curtis <Pavel@parc.xerox.com>
   Sender: Pavel Curtis <pavel@parc.xerox.com>
   Fake-Sender: pavel@parc.xerox.com
   References: <9205261948.AA00859@sis.yorku.ca>
   Date: 	Wed, 27 May 1992 13:00:10 PDT

   I agree with Jeff and Oz; allowing ports to be represented in terms of the
   other standard data types has no advantages and significant disadvantages.  In
   particular, as Jeff mentioned, one must be careful about the *order* in which
   one tests the type of any value.  This code:

	   (cond ((vector? x) ...)
		 ((input-port? x) ...)

   might work *very* differently from this code:

	   (cond ((input-port? x) ...)
		 ((vector? x) ...)

   and the difference can (and will) depend on the implementation being used.
   This, it seems to me, can only lead to confusion.

What happens if records are added?  ports are not allowed to be