swift-apis
swift-apis copied to clipboard
Conditionally Conform Optional to Differentiable
The bug can be viewed here.
This is the first step in solving #111. You can view the discussion here.
This issue is for discussion of the same.
CC : @dan-zheng @bartchr808
Thank you for filing the issue! Before we go about implementing it in the standard library, it is not 100% clear this is the right direction, and thus some prototyping offline is necessary. There are lots of issues to think about, for example: What should the TangentVector
of an optional be? Should Foo?.TangentVector
be equal to Foo.TangentVector?
? Beyond semantic choices in the implementation, there are also language constraints right now because control flow is not fully supported (more specifically, switch
and pattern matching statements are not supported). We will post an update on this issue when control flow is fully supported.
@rxwei @dan-zheng, would we still need this, since control flow was made differentiable, we could solve #111 with that right?