QtCS2024 Error handling: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Add deck) |
||
Line 7: | Line 7: | ||
==Notes== | ==Notes== | ||
Intro: we already have too many attempts at this, going back at least as far back as 2017. | Intro: we already have too many attempts at this, going back at least as far back as 2017. | ||
[[File:QtCS2024 Error Handling.pdf|alt=Proposal to use Sy Brand's std::expected implementation in Qt|center|thumb]] | |||
Volker's proposal: | Volker's proposal: | ||
* use the C++17-compatible full implementation by Sy Brand at https://github.com/tartanllama/expected | * use the C++17-compatible full implementation by Sy Brand at https://github.com/tartanllama/expected |
Revision as of 14:22, 5 September 2024
Session Summary
Session Owners
Volker Hilsheimer Note taker: Thiago
Notes
Intro: we already have too many attempts at this, going back at least as far back as 2017.
Volker's proposal:
- use the C++17-compatible full implementation by Sy Brand at https://github.com/tartanllama/expected
- Licence: CC0 (QtC legal needs to confirm it's ok to use even for commercial, but Thiago thinks it is [but he isn't a lawyer])
- Includes things that even most of Standard Library implementations don't yet
- import into Qt
- use it internally
Should we use it in public API?
- If we do, then we can't switch to std::expected (C++23) before at least Qt 7.0
- It becomes part of our ABI
- Shouldn't be named q23::expected because it conveys the wrong message
- Do we need to use it in public API?
- No, we don't need it
- But it's very useful for that; the type is designed for use in interface boundaries
- Suggestion:
- Use it internally first so we gain experience with its issues and how to use it
- Then, later, make it public to use it
Alternatives: