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

grammar, possibly misleading #1473

Open
Velumuthali opened this issue Feb 17, 2024 · 3 comments
Open

grammar, possibly misleading #1473

Velumuthali opened this issue Feb 17, 2024 · 3 comments

Comments

@Velumuthali
Copy link

Enumerations
"An enum where no constructors contain fields are called a field-less enum."

  1. grammar: are called may be changed to is called.
  2. possibly misleading:
    "where no constructors" . The plural 'constructors' suggests that more than one constructor is allowed.
    My idea:
    If an enum constructor contains no fields, the enum is called a field-less enum.
@bjorn3
Copy link
Member

bjorn3 commented Feb 17, 2024

For 2: Each variant of an enum has it's own constructor. None of these may have any fields for the enum as a whole to be called a field-less enum.

@Velumuthali
Copy link
Author

Sir bjorn3, Thank you for pointing out the inexactness my suggestion. I stand corrected. But I humbly feel "Each variant of an enum has it's own constructor" is suspicious.
This may do better:
For 2 If every variant of an enum that has a constructor has no field in the constructor, then the enum is called a field-less enum.

@ahmed-mohamed-eng
Copy link

@bjorn3 As a non-native speaker I agree with @Velumuthali on his/her suggestion.

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