Skip to content
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

Support the type "float" in ra-api-?.dtd #1259

Closed
canardleteer opened this issue Oct 26, 2018 · 3 comments
Closed

Support the type "float" in ra-api-?.dtd #1259

canardleteer opened this issue Oct 26, 2018 · 3 comments

Comments

@canardleteer
Copy link

I have got a use case for a parameter of type float.

While I can encode this in a string for now, I could also do a PR for a change here. I am hesitant to propose changing a versioned contract that hasn't changed in close to 9 years. I am also hesitant to propose making a new major version contract for such a tiny change.

Would it be reasonable to propose ra-api-1-1.dtd or is there a larger ra-api-2.dtd effort in the works that I could append my desired change to?

@oalbrigt
Copy link
Contributor

You should create an issue on the OCF-spec repo: https://github.com/ClusterLabs/OCF-spec where these things are considered and implemented.

@jnpkrn
Copy link
Contributor

jnpkrn commented Oct 29, 2018

Agreed that OCF-spec is the right target.

Please note that any addition will require a decent amount of
deliberation, since what you may see behind a generic float
(likely raising a simplest idea of numbers like 1.24 in your
mind) shall rather be a rigorously defined data type; consider:

  • are plus/minus infinity values allowed? how to express them
    lexically?

  • are exponent forms allowed? how to express them lexically?

  • what are the actual numeric constraints wrt. preciseness?
    (compare float vs. double data types in C standard)

  • ...

  • last but not least: how does it combine with existing
    treatments of the very abstracted numeric data types
    elsewhere (said C standard, XML schema datatypes, etc.)

You can see this starts to be convoluted pretty fast.
But a standard like OCF needs to deal with all these details
for it to be useful, a definite answer, after all.
Brain-absenting simplest additions would make just for further
erosion down the road.

(On that topic, see also:
ClusterLabs/OCF-spec#19)

@canardleteer
Copy link
Author

I agree adding float isn't as simple as just adding float, what makes it even more difficult, is where that parameter gets put into use, since it can be fed downstream to an unlimited number of recipient types, each with their own notion of float/double/decimal.

I'll think about it a little more and make an issue over in OCF-spec when I get a chance.

Closing this one. Thanks for pointing me over to the spec work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants