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

Re: Format strings are wrong

This page is part of the web mail archives of SRFI 48 from before July 7th, 2015. The new archives for SRFI 48 contain all messages, not just those from before July 7th, 2015.

I think at a general level, your criticisms are a good attack on
a style of I/O programming.  However, it isn't a style of I/O
programming that is going to go away, and I think it is worth
supporting, cf. Bear's last message for a defence that C-style
output, if broken is at least not abjectly broken.

Maybe a useful way to advance the discussion is to break it up
in two parts:
   1. Merits of C-style vs. functional-style output formatters
   2. Merits of Ken's proposal as a C-style output formatter

Maybe also it is worth the final SRFI including a relationship of
the C-style formatter to a functional style formatter (eg. the
semantics could be a transformation from the one to the other).

Specific points and criticisms:
  1. I think single letter escapes are fine: like mathematical
  constants if you use or often read them, you'll remember them.
  However, I would like it to be the case that you don't need to have
  memorised the whole table to be able to tell consuming escapes from
  non-consuming escapes (eg. upper case vs. lower case, alphnumeric vs.
  2. Is it good to have both ~? and ~K: why have backward compatibility
  cruft in the first SRFI?  Explanation, please!
  3. It seems to me the nicest functional formatter uses the standard
  string concatenater together with quasiquotation.