Urs Liska <u...@openlilylib.org> writes: > Am 13.08.2016 um 08:10 schrieb David Kastrup: >> Urs Liska <u...@openlilylib.org> writes: >> >>> I have written a function to return the lowercase version of a symbol >>> for use in my library as >>> >>> % Return the lowercase version of a symbol >>> #(define (symbol->lowercase sym) >>> (string->symbol >>> (string-downcase >>> (symbol->string sym)))) >>> >>> Just a small question: this seems so general >> Why? What would that be useful for? Normal convention for symbols is >> already lowercase. > > I accept package/module names as a symbol-list path, and users are > allowed to write them using "display" names, like > > \loadModule scholarLY.annotate > > Internally I'm converting them to lowercase to prevent ambiguity, so > input is a symbol but with arbitrary case. Having a list of strings > would be much less convenient to use.
Case insensitivity is almost never a good idea. It leads to stuff that sometimes works and sometimes fails under mysterious circumstances. For example, you are aware that in a Turkish locale, I downcases to ı instead of i , and i uppercases to İ instead of I ? And if you do search-and-replace operations (like convert-ly does) for code changes, you'll only catch some parts. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel