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

Re: [Scheme-reports] I/O redux



On 2011-05-03, at 00:30, John Cowan wrote:
> Vincent Manis scripsit:
> 
>> I would also put in a weak suggestion for CONSOLE-INPUT-PORT and
>> CONSOLE-OUTPUT-PORT,
> 
> I think that's piling Pelion on Ossa.

I have never had a suggestion of mine dismissed quite that way before, but you're right, my suggestion deserved no less :). 

>> 5. [New] §6.7.1, bottom of col 2, p. 45. WITH-INPUT-FROM-FILE and
>> WITH-OUTPUT-TO-FILE are defined, but should not WITH-ERROR-TO-FILE
>> also be added?
> 
> My feeling is that it's not useful enough: redirection of standard
> error should typically be done at program invocation time.  A program
> that wants to rebind standard error to syslog or the like can do so by
> passing a suitable port argument to CURRENT-ERROR.

Scheme in general has admirable consistency. For data type foo, you create an instance by calling MAKE-foo, you test type by doing foo?, and, if it makes sense to ask for the size of foo, you call foo-LENGTH. Scheme isn't perfect in that way; sometimes history trumps consistency, which is why we have LENGTH rather than LIST-LENGTH. But it's pretty good. 

Some of the additions to this revision of the report are particularly meritorious from a consistency viewpoint, such as the new division procedures, and {STRING,VECTOR}-(MAP,FOR-EACH}. 

Imagine that the WG had decided to provide STRING-MAP but not STRING-FOR-EACH, on the grounds that the latter is easy enough to program yourself. This is true, but if one were provided and the other omitted, I would feel a tiny bit less confident in my use of the language, because I'd need to look up in the Report whether something I had good reason to believe was there is actually there. 

There are three CURRENT-xxx-PORT procedures but only two WITH-xxx-TO-FILE procedures. That's why I think WITH-ERROR-TO-FILE should be provided.  

I'm very happy with John's other responses to my original email. 

-- vincent


_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports