Path: utzoo!attcan!uunet!decwrl!ucbvax!bloom-beacon!ZURICH.AI.MIT.EDU!cph From: cph@ZURICH.AI.MIT.EDU (Chris Hanson) Newsgroups: comp.lang.scheme Subject: with-input-from-file, with-output-to-file Message-ID: <9008201754.AA12024@life.ai.mit.edu> Date: 20 Aug 90 17:55:04 GMT References: <1467@tub.UUCP> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 52 Date: 20 Aug 90 11:48:43 GMT From: Oliver Laumann Organization: Technical University of Berlin, Germany Sender: scheme-request@mc.lcs.mit.edu I just noticed that the procedures with-input-from-file and with-output- to-file are in the draft R^3.99RS, but not in the P1178/D4 (the version from March 7, 1990). Is this omission intended? If so, why? Thanks, -- Oliver Laumann net@TUB.BITNET net@tub.cs.tu-berlin.de net@tub.UUCP From "Differences between R4RS and Proposed IEEE standard", January 27, 1989: * The following procedures have an ill-defined semantics in the presence of the escape procedures produced by call-with-current-continuation. In addition, we have two other mechanisms for opening files (open-{in,out}put-file, call-with-{in,out}put-file) rendering these unnecessary. A further complication is that these procedures bundle the action of opening a file with the (separate) action of binding the default (input or output) port. In R4RS there is no orthogonal mechanism for binding the port; we propose such a mechanism (via with-input-from-port and with-output-to-port below) and suggest removing these "bundled" versions. A reference implementation of these procedures is provided in an appendix. with-input-from-file with-output-to-file From "IEEE/MSC/P1178 Working Group on Scheme: Unapproved Minutes of Meeting", 3 February 1989: 6.4 WITH-INPUT-FROM-FILE and WITH-OUTPUT-TO-FILE. The editors proposed replacing WITH-INPUT-FROM-FILE and WITH-OUTPUT-TO-FILE with WITH-INPUT-TO-PORT and WITH-OUTPUT-TO-PORT, respectively, since this made the dynamic binding of ports orthogonal to the opening of files. However, there was substantial concern that the semantics of any dynamic binding mechanism was ill-defined in the presence of escape procedures. Moved, seconded, and approved: delete WITH-INPUT-FROM-FILE and WITH-OUTPUT-TO-FILE, and do not add WITH-INPUT-FROM-PORT or WITH-OUTPUT-TO-PORT.