Crell / enum-comparison

A comparison of enumerations and similar features in different languages
80 stars 7 forks source link

Visibility modifiers #10

Closed iluuu1994 closed 3 years ago

iluuu1994 commented 4 years ago

Should we allow private cases? How would that work with pattern matching?

iluuu1994 commented 4 years ago

Comment from @bwoebi:

Is there any case or reason why an enum should ever contain protected or private contents? I consider an enum to be a fully transparent object without hidden state - immutable and fully open. Enums are data, not state.

As such I would also drop the visibility modifier from associated values argument lists.

iluuu1994 commented 3 years ago

We'll deal with this later on.