Thread Links | Date Links | ||||
---|---|---|---|---|---|
Thread Prev | Thread Next | Thread Index | Date Prev | Date Next | Date Index |
P1788 I think part of Vincent's email below is superseded by a later version of the I/O text that I sent so far to only a few people. I attach this later version; I've already had comments on it. On 2013 Jun 28, at 13:18, Vincent Lefevre wrote: > On 2013-06-26 13:15:47 +0100, John Pryce wrote: >> (1) >> It leaves to the implementation the detail of how to read strings from an input stream. >> ... >> I hesitate to get 1788 into such language-defined matters but maybe we need to say something. > > IMHO, P1788 should only specify text2interval, where the argument > needs to be a valid interval literal... > Moreover it could be said that the behavior of text2interval and > interval2text in non-default locales (for languages that have such > a notion) is unspecified by P1788. Yes >> (2) >> ...- *formatted* output: interval2text(x, cs), conversion specifier cs required. > I wouldn't say that it is formatted output... Perhaps "parameterized output"... OK > It should be said that the output string shall have a type-independent > language-defined or implementation-defined Level 1 interpretation, and > containment shall be satisfied. This is necessary to be read back by > text2interval with any destination type. > > ...If we don't plan to specify free-form output (I don't think we should, > as this must remain language-defined or implementation-defined, IMHO), > then we don't need it: this is just a language matter. You can mention > that in a footnote. Why shouldn't we? Maybe there's a misunderstanding, "free-form" isn't the correct word? But IMO we need a "vanilla" way to turn an interval to an interval literal. > Also, text2interval and public2interval depend on the return type, but > this type doesn't appear in text2interval(s) and public2interval(s) > since the argument s is just a string. You should write: > > text2interval(s,T) / public2interval(s,T) > or > text2interval_T(s) / public2interval_T(s). According to §11.2 "Naming conventions for operations" we can say T-text2interval(s), etc., or simply refer to an operation text2interval(s) "of the type" under discussion, leaving the type implied. Clearly yes, at the level of code the type has to be part of the operation name since it can't be inferred from s. > Moreover I suppose that if T is a subset of T' and xx is an interval > of type T (so that hull_T'(xx) = xx), it is *not* required that > > public2interval(interval2public(xx),T') = xx More to write, the more I look at it, so I write separately about it. John Pryce
Attachment:
20130716IOclause.pdf
Description: Adobe PDF document