You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this is a perfectly valid use case for languages like JS and C++, as result<> return type are lowered into blob directly, using exceptions to propagate error-type values if they occur. This is what happens already with normal methods that return result<>.
Thoughts? I wonder if it is possible to enable this use case. Without it, APIs are forced to use alternative static methods like create: static func(), which is not standard, and hurts readability/discoverability.
Today, the following syntax is illegal, since constructors have no return types:
However, this is a perfectly valid use case for languages like JS and C++, as
result<>
return type are lowered intoblob
directly, using exceptions to propagateerror-type
values if they occur. This is what happens already with normal methods that returnresult<>
.Thoughts? I wonder if it is possible to enable this use case. Without it, APIs are forced to use alternative static methods like
create: static func()
, which is not standard, and hurts readability/discoverability.Moved from bytecodealliance/wit-bindgen#1114
The text was updated successfully, but these errors were encountered: