Email list hosting service & mailing list manager

questionable definition of "freshline" in srfi-48 Per Bothner (18 Mar 2020 23:36 UTC)
Fwd: questionable definition of "freshline" in srfi-48 Arthur A. Gleckler (18 Mar 2020 23:50 UTC)
Re: Fwd: questionable definition of "freshline" in srfi-48 ken.dickey@xxxxxx (19 Mar 2020 05:01 UTC)
Re: Fwd: questionable definition of "freshline" in srfi-48 Arthur A. Gleckler (20 Mar 2020 00:17 UTC)

questionable definition of "freshline" in srfi-48 Per Bothner 18 Mar 2020 23:35 UTC

I just implemented (import (srfi 48)) for Kawa (partly to try out the srfi-64 re-implementation).

In srfi-48 the ~& Freshline escape is defined as:

    "output a newline character if it is known that the previous output was not a newline"

I think this is backwards.  Common Lisp has:

    Unless it can be determined that the output stream is already at the beginning of a line, this outputs a newline.

I that is more useful.  It is what Kawa implements - even if you (import (srfi 48)):
I'm not planning on changing Kawa's srfi-48 support to be compatible with what I
think is a broken definition.

Note there are two problems:
(1) If the previous character is unknown, Common Lisp (and Kawa)
writes a newline, while the SRFI 48 specification would not.
(2) If known to be at the beginning of output, Common Lisp (and Kawa) would
not write a newline, while the SRFI 48 specification would.

This is probably not a pure editorial fix.  The specification includes an example, which I think
is wrong in that it writes a newline at the start of the output.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/