[Development] Qt UDL operators

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Mon Apr 4 15:22:13 CEST 2022


Il 30/03/22 15:44, Sona Kurazyan ha scritto:
> # keep _qs, _qba, add _qL1, keep Qt::StringLiterals::_L1, add 
> Qt::StringLiterals::{_s, _ba} 
> (https://codereview.qt-project.org/c/qt/qtbase/+/402948 
> <https://codereview.qt-project.org/c/qt/qtbase/+/402948> + 
> https://codereview.qt-project.org/c/qt/qtbase/+/401308 
> <https://codereview.qt-project.org/c/qt/qtbase/+/401308>)

I'd personally vote for this option -- whatever users use, they have the 
full set. It'd be super-annoying to have to mix and match (codebase 
already using _qba now has to import the others...)

I'm not also too sold on the argument that _qs ought to be deprecated. 
Qt de-facto has always reserved every single name starting in q (or Q) 
in the global namespace. Whether polluting the global namespace (and/or 
living "without a namespace") is a good idea or not, that's a sailed 
ship unfortunately. That just carries over to these UDLs. This is to 
say, I'm not opposing their deprecation and subsequent removal, and I'm 
much in favour of actual deprecation rather than hiding behind yet 
another QT_NO_GLOBAL_UDLS or similar, I'm just saying that "name 
pollution" isn't a very much convincing argument (for the good and the 
bad)...

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: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20220404/135cf198/attachment-0001.bin>


More information about the Development mailing list