API proposal: deprecate ULocDataLocaleType::ULOC_REQUESTED_LOCALE

Vladimir Weinstein <[email protected]> Tue, 11 Nov 2003 13:56:53 -0800
Newsgroups gmane.comp.lib.icu.general
Message-ID <[email protected]>
Expiration: 11/18/2003

I am proposing to deprecate ULocDataLocaleType::ULOC_REQUESTED_LOCALE value and 
its usage in all the APIs.

This value is used to retrieve the locale user requested during the 
instantiation of the locale driven services. However, it turned out that:
1. keeping the requested locale around means that we have to have a growable 
buffer in our classes/structs. This adds unneeded burden to instance sizes and 
slows down all the initialization and assignment operations.
2. users do know what locale they requested

ULOC_VALID_LOCALE and ULOC_ACTUAL_LOCALE will remain unchanged.

APIs that are taking ULocDataLocaleType argument will react to 
ULOC_REQUESTED_LOCALE in the following way:
- C APIs, returning const char* locale string will return a NULL. No error will 
be set.
- C++ APIs, returning Locale object, will return the default locale object.
- JAVA APIs will not feature the ULOC_REQUESTED_LOCALE value, since it is being 
implemented in this release.

Thank you!

Regards,
v.

-- 
Vladimir Weinstein, IBM GCoC-Unicode/ICU  San Jose, CA [email protected]