Skip to content

tl::expected : yay or nay? #9

Description

@sea-bass

I really like tl::expected. It makes C++ code really nice to work with.

However, I am worried about making Python bindings if most functions have output types wrapped in expecteds.

Critically, nanobind does not support this (nor should it because it's a C++17 library and this feature is 23? (see discussion)), so we'd have to essentially encase all our bindings into lambdas that check the expected and do a custom thing on the Python side in the event of failure -- like raise an exception.

I'm sure this is macroable, but... is it worth it? I wanted to open up some discussions here.

cc @eholum @v4hn (because I can pick on you)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions