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

In the python language, the union type defaults to "keyless = False" #235

Open
xuhongrun opened this issue Feb 29, 2024 · 1 comment
Open

Comments

@xuhongrun
Copy link

In the python language, the union type defaults to "keyless = False"

But in C/C++ language, the union type does not have a key.

@eboasson
Copy link
Contributor

But in C/C++ language, the union type does not have a key.

... that may be so, but in the OMG DDS world ... it does optionally have a key, the discriminator. This has always been allowed by the DDS specs, an easy reference is the OMG DDS XTypes specification, wherein 7.2.2.4.4.4.8 "Key Members" states:

In a union type, only the discriminator is permitted to be a key member. The union discriminator is marked as a key by annotating the discriminator itself with the @key annotation [...]

I believe I am being quite generous when I say I think the decision to allow this was misguided ...

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

2 participants