QtCS2024 Error handling: Difference between revisions
Jump to navigation
Jump to search
(Created page with "==Session Summary== ==Session Owners== ==Notes== Category:QtCS2024") |
Manordheim (talk | contribs) m (Fixed boost links) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
==Session Owners== | ==Session Owners== | ||
Volker Hilsheimer | |||
Note taker: Thiago | |||
==Notes== | ==Notes== | ||
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: | |||
* 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 <tt>std::expected</tt> (C++23) before at least Qt 7.0 | |||
* It becomes part of our ABI | |||
* Shouldn't be named <tt>q23::expected</tt> 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: | |||
* [https://www.boost.org/doc/libs/1_79_0/libs/leaf/doc/html/index.html Boost LEAF] | |||
* [https://www.boost.org/doc/libs/1_85_0/libs/outcome/doc/html/index.html Boost Outcome] | |||
[[Category:QtCS2024]] | [[Category:QtCS2024]] |
Latest revision as of 11:45, 6 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: