Code Monkey home page Code Monkey logo

Comments (11)

desruisseaux avatar desruisseaux commented on June 22, 2024

It depends: what is the purpose of annotate?

from unit-api.

keilw avatar keilw commented on June 22, 2024

To create an "annotated unit", but unlike alternate, compound (aka mix) or transform, annotate wasn't in JSR 275 either: https://www.jscience.org/api/javax/measure/unit/Unit.html

Seems it is for http://ceur-ws.org/Vol-432/owled2008eu_submission_21.pdf or the "curly braces" in UCUM: http://unitsofmeasure.org/ucum.html It seems more specific than the others.

from unit-api.

desruisseaux avatar desruisseaux commented on June 22, 2024

Okay, I have read ยง6 curly braces section on UCUM page. Now how do we translate that in Java API? Can you post a javadoc describing the contract of such annotate method? Is the only effect of that method is to modify the String representation of the unit? Do we provide a method for fetching the annotation set by annotate? What happen to the annotation in arithmetic expression? For example if A were annotated, is the annotation gone after A.multiply(B)?

from unit-api.

keilw avatar keilw commented on June 22, 2024

@dautelle It seems annotate() is very specific to the UCUM catalog, or did it have any more general purpose?

from unit-api.

dautelle avatar dautelle commented on June 22, 2024

Annotations can be used to be more specific about the unit, for exemple 15.0 Gal [Petroleum], mile[standard] different from a mile[US_survey], etc.
See Mapplesoft examples

from unit-api.

keilw avatar keilw commented on June 22, 2024

@dautelle Could you please raise your thumb here, as nobody really seems to care about it in the API?
The point about all these decision tickets is to determine if enough people think they are important enough to provide API methods. At the moment this one would fail, given the Apache inspired voting criteria this one fails to be relevant or "interesting" enough. #185 gained 4 +1 votes, so it'll pass. #103 has 2, so one is missing. All others failed meaning there's no action on them.

from unit-api.

teobais avatar teobais commented on June 22, 2024

Having read the discussion and related links, I believe annotations should better be provided in our API. That way, we will ease our users' way of working, in case they need more explanatory units. That said, +1 from my side.

from unit-api.

keilw avatar keilw commented on June 22, 2024

Great, thanks a lot. @unitsofmeasurement/experts, @unitsofmeasurement/contributors, please also chip in if you agree. While discussions about implementation details of a particular implementation (resulting of either annotate() or mix(), etc.) are certainly welcome, because we also have to finish the RI soon, they are not really subject of these questions which are simply "is it important and useful enough to be in the API?".

from unit-api.

teobais avatar teobais commented on June 22, 2024

Maybe we need to close this one as well, given that we closed most of the related ones today?

from unit-api.

keilw avatar keilw commented on June 22, 2024

I think it's to rarely used for the API.

from unit-api.

teobais avatar teobais commented on June 22, 2024

Cool! That drops the overall amount of open issues to an one-digit number again :-)

from unit-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.