On 22/03/2021 17:19, Thiago Macieira wrote:
I thought we'd fixed that and reverted them. Or didn't we add toContainer?

Peppe, what was our final conclusion here?

There was no conclusion reached, unfortunately, and didn't manage to provide a replacement in time. I was (and still am) afraid at simply reintroducing .to<Container>() functions.

One reason is purely API quality: implementing them "correctly" in C++14/17 without ranges/concepts is not exactly funny (just look at the ranges::to proposal for how many corner cases are there to consider), and there's indeed already ranges-v3::to as the ready-made solution (so why spending time redoing it). Given a half-cooked solution wouldn't be acceptable into QtCore, we'd need to put it somewhere else where we could be more flexible in terms of minor API breaks if we think we did a mistake, and we didn't find the right place. (KDToolBox comes to mind, eventually).

The other reason was more profound and related to the deprecation of these APIs, meaning that in the huge majority of usages found was a form of algorithmic abuse. Should we offer APIs which facilitate bad coding practices?

My 2 c,
--
Giuseppe D'Angelo | giuseppe.dang...@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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to