Subject RE: [IB-Architect] Syntax for case insensitive sort
Author Claudio Valderrama C.
> From: David Schnepper <dschnepper@...>
> And once you add Case vs No Case,
> well, might as well add Accent vs No Accent
> and digits before letters vs letters before digits
> and, heck, not that much work to require a driver to have an option for
> putting digits
> into text form (Eighteen-Twelve Overature)
> and it would be cool to have an option to merge McDonald and
> MacDonald, just
> in case I
> wanted to use this driver to sort names.

Please, don't forget my requirements: I need a driver able to perform
ordering on integers, but using lexicographic comparison over their hex
representations and ignoring the leading zeroes. And in pure character-based
ordering, please don't forget that in Spanish, using accents on uppercase
characters is considered optional.

> Where do you draw the line between what's "an option in a driver" and a
> "separate driver" ?

I draw the line where the implementor has to build several convoluted
conditions to handle cases that have [almost] nothing to do one with another
or when further complexity is introduced only to satisfy very special and
optional cases. One piece, one function... ideally. Easier to say than to
put in practice.
For example, a driver for case insensitive in language X is fine. If the
language rules mandate the accented characters are undistinguishable from
the rest, then put that logic in the same driver. If such rules aren't
mandatory, then consider anoter driver for them. Why? It seems arbitrary and
asymmetric. Yes, but there's complexity on the other side: don't waste
effort in a feature that's absolutely optional and not mandatory and not
very common but reserve this effort for the cases where such functionality
is the absolute requirement. Even more: if it was possible to build some
kind of "template" of code to handle language-independent issues, then
perhaps this discussion is not worth the time.
Just a comment. Not trying to start a battle.

Claudio Valderrama C.
Ingeniero en Informática - Consultor independiente