[Development] The future of smart pointers in Qt API
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Sat Feb 1 10:15:02 CET 2020
Il 01/02/20 09:27, Allan Sandfeld Jensen ha scritto:
> To me the name is still perfect. It makes perfect sense. Just because it is
> movable doesn't mean you move the object itself, a move moves the content of
> the object. So each move triggers a move of the payload of a scoped pointer to
> another scoped pointer in another scope.
>
> I never understood why anyone would think the name would make that impossible.
The counter argument is: it would imply that the _pointer_ escapes the
_scope_.
This conversation is 9 years too old -- the ship has sailed.
std::unique_ptr is the vocabulary type that is on every C++ book
teaches, every C++ talk explains, every C++ project uses (all over the
place inside Qt itself). Unless some extraordinary argument appears,
that's the name that Qt should also use.
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/20200201/e6c8ab69/attachment-0001.bin>
More information about the Development
mailing list