On Thursday 16 January 2025 07:13:50 Pacific Standard Time Mathias Hasselmann via Development wrote: > Do you really propose that we write > QRegularExpression::PatternOption::UseUnicodePropertiesOption in the > future? That's an identifier of 61 characters length. Considering my > thoughts about such identifiers is left exercise to the reader.
I think it's a given that you wouldn't repeat "Option" in the enum name. We use them today to be clear the enums are from the same set, when multiple enums appear in one scope. With scoped enums, we don't need that, so we must use a different naming scheme. So I don't mind that the API review for *new* enums suggest that they be scoped, if it's possible. For example, for QSaveFile right now, we are looking at QSaveFile::Option::AllowDirectWriteFallback and DontFollowSymlinks. An unscoped enum would simply move the "Option" from the middle to the end, with little space saved. But at this point I am not in favour of mandating them for all new enumerations. There are still too many cases where they don't make sense. And we definitely are not in a place to suggest that they be the only solution come Qt 7. -- Thiago Macieira - thiago.macieira (AT) intel.com Principal Engineer - Intel DCAI Platform & System Engineering
smime.p7s
Description: S/MIME cryptographic signature
-- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development