Good point Jochen. I am not sure I understood the full picture of
where you'd like to head, but I tried to capture in a ticket some of
what you said folded in with the JDK builtin "Best Practices":

* Use Locale.ROOT for any data that is meant for machines, protocols,
file formats, network code, or internal database keys.
* Use Locale.getDefault() exclusively when you are rendering text,
dates, numbers, or currencies directly onto a user interface for a
human to read.

But we can debate how we might further tweak those best practices.

Jira ticket is here:
https://issues.apache.org/jira/browse/GROOVY-12152


Cheers, Paul.

On Sat, Jul 11, 2026 at 3:16 PM Jochen Theodorou <[email protected]> wrote:
>
> Hi,
>
> the pull request for this was already closed so I had no chance to
> comment on it itself.
>
> I think there is a discussion about default locales I would like to start.
>
> My personal reality is that the default locale is useless. In fact it is
> actually a pain to work around it and very often I have to use multiple
> formats even for the same language. Not even the tests for GROOVY-12147,
> which also adds methods based on default locals, test based on the
> default locale. And I think they should.
>
> I would like to start a potentially controversial discussion:
>
> Do not support methods depending on the default Locale in GDM.
>
> If we want to have a convenience variant without formatter or locale,
> then let's define one format. I would especially remove that currency
> variant introduced in that PR.
>
> What do you guys think? I am especially interested in the opinion of
> people that do not program for just one country/region. I for example
> have very often programs in swiss/german/italian/french/english at the
> same time. At least if it is more than just a small command line script.
> Already when writing log files I may need a different format than what
> my locale says.
>
> bye Jochen

Reply via email to