Crell/enum-comparison

value or value() or getValue()?

Closed this issue · 4 comments

That is the question.

Crell commented

My preference:

  • value()
  • value
  • getValue()

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.

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.

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

Crell commented

Already done based on the latest code.