[r6rs-discuss] Proposed features for small Scheme, part 3: Unicode
Arthur A. Gleckler
scheme at speechcode.com
Tue Sep 8 00:39:00 EDT 2009
> Gosh, John, if it's this easy, why did we have all those arguments before
> in which certain people were saying it was /impossible/ to have
> case-insensitive identifiers?
> (define (same-identifier? id1 id2)
> (or (equal? (string-downcase (symbol->string id1))
> (string-downcase (symbol->string id2)))
> (equal? (map char-downcase (symbol->string id1))
> (map char-downcase (symbol->string id2))))
> Or maybe you have to upcase it and downcase it for greatest generality? But
> something like this. Whatever is most inclusive.
> +1 for your proposal if we can have case-insensitivity back!
Thank you so much for bringing this up! I loathe the change that made
Scheme case-sensitive. Unicode has a clearly laid out system for
doing case-insensitive comparison of identifiers for programming
languages (<http://unicode.org/reports/tr31/tr31-5.html#R5>), and we
should be able to use it in Scheme.
More information about the r6rs-discuss