[Development] HEADS-UP: QStringLiteral

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Wed Aug 21 17:39:07 CEST 2019


On 21/08/2019 13:19, Bogdan Vatra wrote:
>    Holy mother of sweet Jesus Christ, are you calling these "minor issues" ?!?!
> Are you insane ? :)

Sorry, let me clarify: the huge amount of classes and facilities in Qt 
and C++ for string handling is an issue, and a major one. If anything, 
teachability of all these options (which are in constant evolution) is a 
big problem.

However, what I was referring about was the problem of using the wrong 
class to manage string-data: if tooling can reliably tell users that 
they're doing a mistake, this drastically reduces the chances of such 
mistakes happening (and the associated cognitive load). As such, then 
having many classes becomes a less important issue (because a tool will 
tell you if you're using the wrong one).

>    I don't think there is any tooling smart enough to detect*ALL*  the
> situations. In previous examples I used only QLatin1String and QStringLiteral
> let's not forget that there are many more: QString::fromXXXXX, QStringView,
> and probably more that I don't know about.
>    THB I don't think tooling is the right answer here, I'm still dreaming to a
> single simple and nice string class and maybe*one*  wrapper*if*  is really
> needed.

Possibly, but that requires a time machine.

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: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190821/29335a2f/attachment.bin>


More information about the Development mailing list