Understanding the Filter View to Use It Right - Nicolai M. Josuttis - ACCU 2024
HTML-код
- Опубликовано: 20 авг 2024
- ACCU Membership: tinyurl.com/yd...
---
Understanding the Filter View to Use It Right - Nicolai M. Josuttis - ACCU 2024
---
Filtering the elements of a collection is one of the most important applications of dealing with ranges and views.
Unfortunately, the filter view (available since C++20) is one of the most suprising C++ standard views.
Even with simple use cases you can easily have:
- Unexpected functional behavior
- Suprising compile-time errors with cryptic error messages
- Fatal runtime errors (without even noticing them)
There are (more or less) good reasons for the design of the filter view. However, for a successful filtering of elements knowing all these pitfalls is key.
Listen and learn things you would not expect but have to know when using the filter views and views in general.
The talk will demonstrate all the issues with simple real-work examples and also explain the (more or less wise) motivation for the design.
Slides: accu.org/conf-...
Sponsored By think-cell
---
Nicolai M. Josuttis
Nicolai Josuttis (www.josuttis.com) is well-known in the community for his authoritative books and talks. For more than 20 years he has been a member of the C++ Standard Committee. He is the author of several worldwide best-sellers, including:
- C++20: The Complete Guide
- C++17: The Complete Guide
- C++ Move Semantics: The Complete Guide
- The C++ Standard Library: A Tutorial and Reference
- C++ Templates: The Complete Guide (w/ David Vandevoorde & Doug Gregor)
---
The ACCU Conference is the annual conference of the ACCU membership, but is open to any and all who wish to attend. The tagline for the ACCU is 'Professionalism in Programming', which captures the whole spectrum of programming languages, tools, techniques and processes involved in advancing our craft. While there remains a core of C and C++ - with many members participating in respective ISO standards bodies - the conference, like the organisation, embraces other language ecosystems and you should expect to see sessions on C#, D, F#, Go, Javascript, Haskell, Java, Kotlin, Lisp, Python, Ruby, Rust, Swift and more.The ACCU Conference is a conference by programmers for programmers about programming.
Discounted rates for members.
ACCU Membership: tinyurl.com/yd...
2024 Program: accu.org/conf-...
accu.org
www.accuconfer...
mastodon.socia...
/ accu-conference
bsky.app/profi...
/ accuorg
/ accuconf
---
RUclips Videos Filmed, Edited & Optimised by Digital Medium: events.digital...
#accuconf #programming #cplusplus #cppprogramming #softwaredeveloper
great talk
I really wish there was a way to get feed back from the community on the library implementation. To have like a beta version of the library that is targeted for the users who want the new stuff.
And make it a part of the standard when the design and all corner cases are figured out. It is hard to implement a thing right the first time. And it's hard to change a thing when it becomes a part of the standard.
Wow. With so many footguns, i might as well completely ban views to prevent my future self from suffering when i ultimately encounter at least some of them.
Who wants to use a highly optimal library that doesn't do unnecessary computation, if it is inconvenient, verbose and has undefined behavior in it. And it is so easy to forget one of the special rules of the views that I bet there will be bugs related to misuse of some sorts. I bet someone will make static analyzer warnings on how you are using the library wrong.
The talk was great though.