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

"Its the little things that count. Hundreds of 'em." -- Cliff Shaw

Some general comments on your proposal:

1) We certainly need most of the functionality you have suggested.

2) I think it's premature to standardize on something like this for
IEEE.  Proposals along these lines should certainly be considered for

Comments on individual issues:

1) IMPLEMENTATION-INFORMATION:  I'd much rather see strings returned.
They are unlikely to be used often, so the extra time spent in the
comparison should not be important.  The analogous MIT Scheme
procedure returns a vector of strings and numbers.


2) FORMAT: I assume you mean the current OUTPUT port when <port> is #t,
rather than the current INPUT port.  I don't mind FORMAT, but I think
that Chris Hanson has some objections to it, which is why MIT Scheme
has flip-flopped between having it and not.

3) PRETTY-PRINT: I would like to extend it in the following way: If
<sexp> is a procedure object rather than a Sexp, it's source code (or
suitable substitute if compiled and source is not available) is
printed instead.

4) RESET and FATAL-ERROR: I would propose a different, more powerful,
procedure instead, on top of which both of these could easily be


fetches a continuation created by the nearest repl (nearest in systems where
there is more than one, like MIT Scheme, the top level one if there is
only one) and executes <thunk> with this continuation.


(define (reset)
  (abort-to-nearest-repl (lambda () unspecific)))

(define (fatal-error message . irritants)
   (lambda ()
     (for-each (lambda (unused-arg)
		 (display #\space)
		 (display obj))
	       (apply format #t message irritants))

I have strong objections against having a procedure named FATAL-ERROR
(or anything else with ERROR in it's name) which does not allow the
option of fixing the bug and proceeding.

I'm not too attached to the name ABORT-TO-NEAREST-REPL.  The similar
MIT Scheme procedure is called ABORT->NEAREST.

5) ERROR must be a special form in order to get the environment of
the "call".  In MIT Scheme, the ERROR special form expands into
something like
(ERROR-PROCEDURE (the-environment) <message> . <irritants>)

6) TRACE and UNTRACE: Do you want identifiers or procedure objects?  

If you want procedure objects you are forcing implementations to make
them modifiable.

If you want identifiers you must make TRACE and UNTRACE special forms
so they can get the environment of the "call" and therefore alter the
correct bindings.

7) ALIAS: Why can't you just use (define <alias> <original>) ?
A different question is making your compiler generate reasonable code,
but this should not be difficult.
If you want to use it for special forms instead (like comment), I'd
rather wait until we have some way of creating syntactic extensions.

8) COMMENT: I think you want to divorce the issues of reading and
ignoring a form.  Maybe it's just a bug in your specification, but I'm
not sure why you involve the reader at all.

9) UNLESS and WHEN: I would wait for syntactic extensions.  I
generally object to adding spurious special forms.

10) COMMENT-WHEN: Does this imply read time or syntax time evaluation?
Again, I'd wait for macros.

11) THE-CURRENT-DATE and THE-CURRENT-TIME: I assume you mean exact
integers for fixnums.

12) string ports: I like them (and use them frequently), but I think
we should bite the bullet and have constructors and selectors for ports:

(MAKE-INPUT-PORT <char-peeker> <char-reader> <char-ready-predicate> <close>)
  (lambda (peek read ready? close)

(MAKE-OUTPUT-PORT <char-writer> <string-writer> <close>)
  (lambda (char-write string-write close)

String ports can easily be built on top of this, but other ports (to
editor buffers, transcripting and tee'd ports, etc) can be built as well.

13) READ-BYTE and WRITE-BYTE: The 0..255 range seems random.

14) BOUND?: must be a special form, since it has no way of obtaining
the environment of the "call".

15) DEFINE-IF-<mumble>: These make sense only at top level of a file,
but not in internal definition position, and that makes them appear
strange.  I don't think that special forms like DEFINE-IF-<mumble> is
the way to conditionalize code, but this is a matter of taste.

I would also change the EQ?  test to STRING=? given my comments about

16) SORT and SORT!: You probably want (SORT <obj> <binary-predicate>).
I don't know what predicate to use by default.

17) AUTOLOAD: Must be a special form like DEFINE and DEFINE-IF-<mumble>.