swift-apis icon indicating copy to clipboard operation
swift-apis copied to clipboard

Conditionally Conform Optional to Differentiable

Open Shashi456 opened this issue 5 years ago • 2 comments

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

Shashi456 avatar Jun 05 '19 06:06 Shashi456

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 avatar Jun 06 '19 06:06 rxwei

@rxwei @dan-zheng, would we still need this, since control flow was made differentiable, we could solve #111 with that right?

Shashi456 avatar Aug 09 '19 17:08 Shashi456