filmov
tv
Do Use C++ Algorithms!
![preview_player](https://i.ytimg.com/vi/iAEIPk64ZJw/maxresdefault.jpg)
Показать описание
You have likely heard it before - "no raw for loops, use algorithms instead".
In this episode Jesper will give a few examples of code that became much cleaner when rewritten from raw loops to algorithms.
Further, he will introduce an algorithm library he had written to make it much less painful to write code using algorithms.
Links:
0:00 Introduction
1:07 Introduction to KDAlgorithms
1:38 The problem with the for_each algorithm
2:53 transform - as a loop
3:28 std::transform
4:25 std::transform in C++20
4:53 std::transform in C++23
5:34 kdalgorithms::transformed
8:00 kdalgorithms::transformed - converting the result type
8:37 kdalgorithms::filtered
11:19 kdalgorithms::all_of
12:11 Feedback please
12:42 Modernizing some old code - understanding the old code.
16:08 Now updating it to algorithms
22:07 A few more notes on KDAlgorithms
The example code showcased in this video is available here:
All Qt Widgets and more videos:
About the host:
The video is presented by Jesper Pedersen, who started with Qt back when Qt was widgets only and the version was 1.44, which gives him 21 years of experience with Qt. Since 2000 he has taught almost 100 Qt classes, ranging from Qt Widgets to QML. Heck, Jesper even taught a few classes on QTopia Core — Trolltech's initial attempt at creating a phone stack. Today Jesper holds a fancy business title, but that doesn't prevent him from coding both in his job and in his spare time.
About KDAB:
KDAB experts regularly take time out to deliver KDAB’s world class training, in-house or at open enrolment courses around the world. We are the market leaders for training in Qt, OpenGL and C++.
In this episode Jesper will give a few examples of code that became much cleaner when rewritten from raw loops to algorithms.
Further, he will introduce an algorithm library he had written to make it much less painful to write code using algorithms.
Links:
0:00 Introduction
1:07 Introduction to KDAlgorithms
1:38 The problem with the for_each algorithm
2:53 transform - as a loop
3:28 std::transform
4:25 std::transform in C++20
4:53 std::transform in C++23
5:34 kdalgorithms::transformed
8:00 kdalgorithms::transformed - converting the result type
8:37 kdalgorithms::filtered
11:19 kdalgorithms::all_of
12:11 Feedback please
12:42 Modernizing some old code - understanding the old code.
16:08 Now updating it to algorithms
22:07 A few more notes on KDAlgorithms
The example code showcased in this video is available here:
All Qt Widgets and more videos:
About the host:
The video is presented by Jesper Pedersen, who started with Qt back when Qt was widgets only and the version was 1.44, which gives him 21 years of experience with Qt. Since 2000 he has taught almost 100 Qt classes, ranging from Qt Widgets to QML. Heck, Jesper even taught a few classes on QTopia Core — Trolltech's initial attempt at creating a phone stack. Today Jesper holds a fancy business title, but that doesn't prevent him from coding both in his job and in his spare time.
About KDAB:
KDAB experts regularly take time out to deliver KDAB’s world class training, in-house or at open enrolment courses around the world. We are the market leaders for training in Qt, OpenGL and C++.
Комментарии