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

Re: ports as real types...



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.

	Pavel