Re: [Scheme-reports] display should not guarantee termination
Ray Dillinger 24 Nov 2012 03:13 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
> misguided.
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
data.
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.
Bear
* 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/
iQEcBAEBAgAGBQJQsDtTAAoJEAOzWkqOibfNxJcH/jFApBk5BbJW5yQaO7JfmSjb
EcbTsPQLbm5SHfIzBPHi0Q+jAu7Df5EnR3Kx16Sa2ogXSh+BBZsxd2FdVhzJPEPy
hCcvYvgxKwNCB7nncug2VxdoHfHdo2GYNKpPwCHbTslZRfUZtN3+LF6rPTCiogmg
OWMa9ozBsV673rUqTXQB+9huXYzDGTHURkli3wkz6ZO/FPQyYj+q5bRATT5wZn65
S7wc5dV9ft78013bvRuZOY1EeZ27UaBZO6l+Y0dIn5uIKcnq9LaBDGuHYfUmRCN1
9v6oTlof7sLRe8rwVbc87lcNCt7Sr1LH5W7CSUmhAwhI+kzXv8iCDZ+S0aIzDXA=
=vdX8
-----END PGP SIGNATURE-----
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports