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

It is not explained what is "unknown" #4110

Open
dlangBugzillaToGithub opened this issue Aug 19, 2020 · 2 comments
Open

It is not explained what is "unknown" #4110

dlangBugzillaToGithub opened this issue Aug 19, 2020 · 2 comments

Comments

@dlangBugzillaToGithub
Copy link

Victor Porton (@vporton) reported this on 2020-08-19T14:45:18Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=21178

CC List

  • kinke

Description

https://dlang.org/spec/enum.html

"An empty enum body (For example enum E;) signifies an opaque enum - the enum members are unknown."

The specification is very unclear here:

What this "unknown" does mean? How does "unknown" differ from "none" in this context?

The specification does not define the meaning of unknown. Formal specifications should not use a word with no clear meaning.
@dlangBugzillaToGithub
Copy link
Author

kinke commented on 2020-08-19T16:23:37Z

That's very subjective - I find it crystal-clear, especially with the 'opaque' hint - it's just like an opaque `struct S;` declaration. Sometimes, a full declaration isn't needed, e.g.:

extern(C++):
enum E : int;
void foo(E);

@dlangBugzillaToGithub
Copy link
Author

dlang-bot commented on 2023-02-01T18:56:41Z

@Mateiuss created dlang/dlang.org pull request #3512 "Fix Issue 21178" fixing this issue:

- Fix Issue 21178

https://github.com/dlang/dlang.org/pull/3512

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

No branches or pull requests

1 participant