[Development] Future of java-style iterators?
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Tue Dec 5 23:02:36 CET 2023
Hello,
Il 05/12/23 22:15, Mathias Hasselmann via Development ha scritto:
> would QDirIterator[1] be part of this deprecation? Its API clearly seems
> be inspired by the Java-style iterators.
>
> While I do not care much about the other Java-style iterators, I really
> like this iterator and use it a lot.
> What would be this iterator's modern replacement in Qt?
Some classes still only have Java-like iterators, not STL-like, so it
would not make sense to deprecate them there.
QDirIterator, QRegularExpressionMatchIterator, (private) QStringIterator
and similar don't have replacements yet.
Yes, one can wrap a Java iterator back into a range API (as I've done
for QREMI, so you can use do `for (auto match : re.globalMatch(subj)`),
but then one really wants C++20 for the algorithms.
Thank you,
--
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 - Trusted Software Excellence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20231205/60801d86/attachment.bin>
More information about the Development
mailing list