[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] display should not guarantee termination
-----BEGIN PGP SIGNED MESSAGE-----
On 11/22/2012 03:49 PM, Per Bothner wrote:
> The specification for display is:
> However, display must always terminate. Thus if the nor- mal write
> representation is used, datum labels are needed to represent cycles
> as in write.
> I think this is wrong, and (arguably) misunderstands what display
> is about, which IMO is to produce plain unadorned human-readable
> output without extra delimiters. Infinite data structures *should*
> produce infinite output. Many programs are intended to run
> "indefinitely", and so any attempt to prohibit unbounded output is
Hmmm. I will have to think about that one.
The cyclical-printing wording in SRFI-38, which is arguably
at the root of the whole datum-label thing in Scheme*, was
... must always produce finite
output when given finite data. ...
which directly addresses your concern about other-than-finite
I don't think I buy your characterization of cyclical data as
non-finite; thus I think your reasoning regarding the behavior
of 'display' on cyclical data is based on a flawed analogy.
However, if we take "display" as a request for human-readable
output, I don't understand how infinite output can possibly
fulfil that purpose. Human brains are sort of bad about
direct reading of anything infinite. For one thing it takes
more time than we have.
* although not really; SRFI-38 was documenting something
that several implementations were already doing, based
on the *print-circular* business in Common Lisp.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
Scheme-reports mailing list