[Development] HEADS-UP: QStringLiteral

Tor Arne Vestbø Tor.arne.Vestbo at qt.io
Wed Aug 21 17:49:52 CEST 2019



> On 21 Aug 2019, at 17:39, Giuseppe D'Angelo via Development <development at qt-project.org> wrote:
> 
> 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 agree that this would mitigate the problem somewhat, but imagine writing your code and being reminded every second:

   warning: using “foo" is not optimal, you should be using QEsotericLiteralStringViewV2NG

😊

Tor Arne 


More information about the Development mailing list