[uim-commit] r1249 - branches/r5rs/scm
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Aug 21 08:11:20 EST 2005
Author: yamaken
Date: 2005-08-20 15:11:18 -0700 (Sat, 20 Aug 2005)
New Revision: 1249
Modified:
branches/r5rs/scm/util.scm
Log:
* This commit adds two Siod compatible procedures. Kazuki, you seems
misunderstanding about the specification of 'print' and 'puts' of
Siod. Please stop using 'print' of SigScheme to replace them, and
restore original behavior of the codes already replaced.
And in my opinion, SigScheme itself should not provide the 'print'
procedure since:
- It's not a standard
- It's easily be misunderstood about its specification
- It's easily conflict with other implementation
I suggest defining 'displayln' in util.scm instead of embedding an
equivalent into the interpreter. Please consider about it.
* scm/util.scm
- (puts): New procedure for Siod compatibility. It should be
obsoleted once all 'puts' have been replaced to 'display'
- (siod-print): Ditto. This is compatible to the 'print' procedure
of the Siod
Modified: branches/r5rs/scm/util.scm
===================================================================
--- branches/r5rs/scm/util.scm 2005-08-20 21:44:19 UTC (rev 1248)
+++ branches/r5rs/scm/util.scm 2005-08-20 22:11:18 UTC (rev 1249)
@@ -311,6 +311,17 @@
(lambda (lst)
(append lst '())))
+;; Siod compatibility
+(define puts display)
+
+;; TODO: Rename to more appropriate name such as 'inspect' (the name
+;; came from debugging terms) or simply 'writeln'. But since I don't
+;; know Scheme culture enough, I can't determine what is appropriate.
+(define siod-print
+ (lambda (obj)
+ (write obj)
+ (newline)))
+
;;
;; SRFI procedures (don't expect 100% compatibility)
;;
More information about the uim-commit
mailing list