-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better approach for CompactNumberFormat in QuantityFormat #349
Comments
@andi-huber, @desruisseaux What do you think about this and could either of you also help or are you too busy with other tasks? |
Hello Werner. I will not be able to contribute in the foreseeable future. I have done many promises on SIS and other projects that I have not been able to fulfil yet… |
Martin, No worries, I think this is small enough to even do it on my own if nobody else had enough resources. And it would solve the "signature concerns" (as tiny and insignificant as they actually are, because most people may not even know what |
Hi Werner, not my field of interest, sorry. |
Andi, no worries, then I'd look into it. I know you are more into "Arithmetics" and your contributions (currently the second-most in this repo) are highly appreciated, so no problem leaving that to others. |
Well quite frankly - regarding the elephant in the room (346) - I have a different perspective. I don't mind a technical discourse, where participants have an opportunity to bring their ideas and then let the better argument win. But to watch this tendency towards insults on a personal level is painful, exhausting and is something I don't want to be associated with. I am here for the fun of it and to learn a few things. |
I did not insult him, and the guy who raised the ticket also wrote the kind of stuff quoted which may be you learn in books or interview questions by the likes of Google, but in reality even the JDK itself does not apply. And you know actually the JCP EC should have told us there was this method signature issue when they did the review before voting on MR1. #251 is older than the MR1 which was after 2.1, but I know even when I was in the EC or @dautelle, the majority of members care about politics or IP rights and licenses and almost none of them ever look at the code. Some did in the "old days" when we filed JSR 275 but after the whole rolling JSR and "rubber-stamping" of Java SE JSRs with almost no real review that also happens to most of the other JSRs especially when there's a MR and not a new JSR.😇 |
Anyway time to solve some real problems like: https://github.com/unitsofmeasurement/unit-api/issues/230 |
Btw @andi-huber how did the work with GeoTools go? You will recall they also had a bit of an unfriendly tone towards us and especially @desruisseaux even more than myself, and that was based on his description mostly because he and SIS "dared to create another implementation". |
I do not think that GeoTools peoples are unfriendly in general. The friction between myself and some other core members had a longer history that started before we decided to continue our developments outside. It is an history of different priorities, code review not properly done, commercial interests causing pressure, etc. Those things happen, it just get more intense when we invested a lot in a project. On latest discussions, I think that authority arguments should be avoided because they create frustrations, because they usually come from a different context not necessarily applicable to the discussion. Instead if a technical argument got no answer or if the answer suggests that there is a misunderstanding, I suggest to divide the technical argument into simpler arguments until we reach a common understanding. |
What is that whole "authority" thing? At least in the JCP EC or Jakarta Spec Committee I was or am elected to a higher "authority" and that I pointed out myself and others were confronted with say JPMS or every Java SE Spec since Java 7. |
The word "authority" was not refering to anyone in particular. "Authority argument" is a generic name for a particular kind of argument. When a discussion uses the opinion of an authority on a topic as evidence to support an argument, this is called "authority argument". The authority is not necessarily any of the peoples participating directly to the discussion. |
Ok but either way I or @dautelle cannot change that we had "multiple hats" including those on the "other side" (than a Spec lead or EG member) of almost every spec including the Java SE ones between 2007 and late 2017, thus having seen and reviewed those specs long before others like @nipafx were involved was naturally part of our duties. I wold also say, in an ideal world we as the EC also should have asked the JSR 376 Spec Lead (Mark Reinhold) for less ambiguity in the wording but there were more critical things to sort out that did not work before the Reconsideration Ballot and we got him to archieve that. A "No vote" stopping the JSR or Java 9 could have caused Oracle to stop the JCP altogether because of losing its face there (similar to trying to ratify some completely unexperienced and unknown company to the EC which all the members also voted down) so it was a compromise we had to make. I don't see @nipafx unblocked yet but I guess those 3 days might be over soon. |
I also created the page for UCAR and JSR 108: http://unitsofmeasurement.github.io/2021/20yearsjavaxunits.html |
I'm not aware of work regarding |
Never mind, if they get there nice, otherwise no problem either. Closing this, because all the methods are removed in favor of the described approach in java12/QuantityFormatDemo. As #301 explained the JDK bug we helped workaround when fixing it, the separate demos are also not required anymore. |
After support and proper handling of the new
CompactNumberFormat
in Java 12 was added by #251 the idea was to control how thatNumberFormat
is created and made part of aNumberDelimiterQuantityFormat
, but limitations of the Java spec (as discussed in #346) would not allow creating an instance viagetCompactInstance(FormatBehavior, NumberFormat.Style)
which it ideally should because that method signature won't work before Java 12. That makesgetCompactInstance(FormatBehavior)
pretty useless because it is merely a convenience wrapper for one of at least two format style cases.And instead a call to either
or
shold be made explicitly.
We likely need the special Java 12 version of
NumberDelimiterQuantityFormat
to handle CompactNumberFormat differently if required, but all the factory methods especially those specific to Java 12 and above could be eliminated that way.The text was updated successfully, but these errors were encountered: