[Development] API style guide: scoped enum or not?

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Wed Jun 14 23:26:52 CEST 2023


Il 14/06/23 22:15, Volker Hilsheimer via Development ha scritto:
> -1 to B from me as well.
> 
> We can allow unscoped enum as an acceptable (if explained) exception from the rule of using scoped enums. Otherwise we remove a tool from our toolbox, even if it has it’s uses in certain (increasingly rare, perhaps) situations.
> 
> More importantly, I don’t agree with the footnoted proposal of making all currently unscoped enums scoped in Qt 7. Such a change would cause a massive porting effort (tool or not), with zero value for users. There might be exceptions where we have genuine issues from certain enums being unscoped, we can fix those with appropriate porting aids and compatibility wrappers/aliases.

I think this should be a completely different question than the usage of 
scoped enums in new code. For instance, I'm all for scoped enums and 
against such refactoring.

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230614/83049456/attachment-0001.bin>


More information about the Development mailing list