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

small changes

I don't mind #t #f (#T #F).  I think that #!true and #!false are
merely long, not necessarily ugly.

    I would even be willing to say that SYMBOL->STRING will return lower
    case, and STRING->SYMBOL will only be guaranteed to accept lower-case
    letters.  Implementations could be permitted to do what they like, even
    signal an error, if there are upper-case letters.  (Case-insensitivity
    advocates should note that this makes no statement about how print names
    are to be stored internally, although these particular procedures would
    presumably be a little more efficient if the internal case of portable
    identifiers was lower.)

I would much rather have a procedure canonicalize-case which takes a
string in either case and converts it to the appropriate case.  I do
not use symbol->string and string->symbol very often, and the extra
code to type does not seem like a real burden but would make
SYMBOL->STRING cheaper since it could always return the standard case
(rather than lower case).  MIT Scheme unfortunately (I don't like it)
uses upper case internally, but SYMBOL->STRING is basically CAR.

Just a comment on my usual style: I write all my code in lower case,
but write quoted symbols in upper case.  Thus they are more easily
distinguishable from identifiers (the quote is easy to miss
sometimes), yet I can conveniently type them in lower case (MIT Scheme
is insensitive).

For example, I would write

(define (definition? exp)
  (and (pair? exp) (eq? 'DEFINE (car exp))))

Which would be true of
'(define (definition? exp)
   (and (pair? exp) (eq? 'DEFINE (car exp))))

I rarely use mixed case in Scheme.

I don't mind #t #f (#T #F).