srfi-129 (titlecase) comments Per Bothner 06 Jan 2016 19:52 UTC
I haven't really tested this or checked all the cases/rules,
but it seems a good update/fix for R6RS and appropriate for R7RS-large.
However, the reference implementation seems designed to be maximally
inefficient, and thus not something I'd be happy to include in Kawa.
I realize a reference implementation must prioritize correctness and
portability for it would be nice if it is usable without a total re-write.
The string-titlecase function seems perfect for SRFI-118 string-append! or
or more portably open-output-string.
Ideally, I'd hide the use of reverse-push, reverse, etc behind macros
so the actual implementation can be more easily optimized, perhaps
using open-output-string for the reference implementation.
Kawa has fast switches on integers - as does many other language
implementations. It would be nice if the mapping tables where in a
macro-friendly format, so they could be transformed into association
lists, hash tables, or case expressions with some file inclusion