On 2025-01-16, Marc Mutz via Development <development@qt-project.org> wrote:
> Can we, please, settle this by strengthening the wording of 
> https://wiki.qt.io/API_Design_Principles#Enums_in_classes to something 
> that requires scoped enums?
>
> I believe everyone agrees that there are _technical_ reasons to prefer 
> scoped enums: no implicit conversion to underlying_type, defined 
> underlying type even if not explicitly given, etc.

> But the implicit conversions of unscoped enums are still unwanted!

I do actually think there is a place where we want unscoped enums.

And that's when they are more used as a constant and as an extension
point.

Places like this are 
 - the roles in the item models.
 - event types

(and maybe others of the same pattern)

Making these scoped enums; I just don't see where the gain is, but I see
lots of pain.

For most othes, though current naming is a bit weird, I prefer scoped
enums.

/Sune

-- 
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to