<i18n dev> RFR: 8268469: Update java.time to use switch expressions [v3]

Stephen Colebourne scolebourne at openjdk.java.net
Thu Jun 17 16:31:34 UTC 2021


On Thu, 17 Jun 2021 13:56:00 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> It is your codebase, not mine, so it is up to you. Aligning things by column is generally frowned on in most style guides because it handles refactoring poorly, resulting in lots of needless change (or people forgetting to realign things - I had to deal with a rogue aligned Javadoc signature today in a PR where exactly that had happened). I also don't see how you write a style guide rule for when these should be aligned and when they should not.
>> 
>> Anyway, this PR isn't really the right place for this discussion - I'm not blocking the PR on this basis (and I'm not an official Reviewer anyway).
>
> I have a slight preference for the aligned version in the cases where the lines are short and the number of spaces used for padding is not unreasonable. I find the code gains in readability in these cases. In the case where the lines are long - I agree with Stephen that the alignment doesn't bring much readability - and sometime it may even be detrimental as it makes long lines longer. Stephen, would that be an acceptable compromise?

Its certainly a reasonable position to take (ie. if thats what OpenJDK wants to do, its fine by me).
I'm more interested to see how you would write such a thing down in the coding standards that doesn't make the standard worthless.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4433


More information about the i18n-dev mailing list