std.locale
Walter Bright
newshound1 at digitalmars.com
Sun Mar 1 17:16:44 PST 2009
Andrei Alexandrescu wrote:
> There will be a global reference to a Locale class, e.g. defaultLocale.
> By default the reference will be null, implying the C locale should be
> in effect. Applications can assign to it as they find fit, and also pass
> around multiple locale variables.
I disagree with being able to assign to the global defaultLocale. This
is going to cause endless problems. Just one is that any function that
uses locale can no longer be pure. defaultLocale should be immutable.
Any function that is locale aware should be parameterized with a locale
parameter. (Not only is that better design, it self-documents the
dependency.)
More information about the Digitalmars-d
mailing list