From: Markus S. <mar...@gm...> - 2011-11-23 00:52:35
|
On Tue, Nov 22, 2011 at 3:57 PM, Mark Davis ☕ <ma...@ma...> wrote: > To make it even simpler, I'd suggest something like: > > enum Choice {NFC, NFD, NFKC, NFKD, NFKC_CF, NFKD_CF} > > public static Normalizer2 *getInstance*(Choice choice) > Easy to use, but (as I mentioned) that would prevent the possibility to re-hardcode only some of the standard data; if we wanted that, the canonical data (nfc.nrm) would be the primary one, while keeping lesser-used data loaded from a file. I would also like it to be easy to get the standard data with other modes, such as canonical+FCD or compat+casefold+DECOMPOSE. Dead-easy-to-use would be to fold both the data file and the mode into the specific function: getNFCInstance() getNFKDInstance() ... but that seems like a lot of functions (5), and it would keep canonical+FCD and such on the existing, harder-to-use API. That's why I came up with the proposal the way I wrote it... markus |