Crell / enum-comparison

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

value or value() or getValue()? #53

Closed iluuu1994 closed 3 years ago

iluuu1994 commented 3 years ago

That is the question.

Crell commented 3 years ago

My preference:

The get prefix is absolutely useless here, and the more I learn about coding practices generally the more convinced I am that get/set prefixes generally are an anti-pattern.

iluuu1994 commented 3 years ago

The get prefix is absolutely useless here

Well, I don't disagree but that argument could be made anywhere. Internal classes pretty much always use get for getters.

iluuu1994 commented 3 years ago

Implemented as a readonly property for now. @Crell Are you ok with that? Can you adjust the RFC?

Crell commented 3 years ago

Already done based on the latest code.