On Fri, Apr 8, 2016 at 8:35 PM, smaug <[email protected]> wrote:
> enum classes are great, but I'd still use prefix for the values. Otherwise
> the values look like types - nested classes or such.
> (Keeping my reviewer's hat on, so thinking about readability here.)
In some cases I think it's extremely clear, like this:
enum class Change { minus, plus };
whose sole use is as a function parameter (to avoid a boolean
parameter), like so:
ChangeIndentation(*curNode->AsElement(), Change::plus);
In cases where it might be mistaken for a class, it might make more
sense to prefix the enum class name with "E". I don't think this
should be required as a general policy, though, because for some enums
it might be clear enough without it.
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform