# Differentiable programming for gradient-based machine learning

**URL:** <https://forums.swift.org/t/differentiable-programming-for-gradient-based-machine-learning/42147>\
**Category:** Pitches\
**Tags:** numerics, autodiff, machine-learning\
**Created:** [November 19, 2020, 6:15pm UTC](https://forums.swift.org/t/differentiable-programming-for-gradient-based-machine-learning/42147 "2020-11-19T18:15:16Z")\
**Posts on this page:** 1\
**Showing post:** 97

<div class="post-metadata">

**Author:** ![dabrahams](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dabrahams/32/9815_2.png) [@dabrahams](https://forums.swift.org/u/dabrahams)\
**Post date:** [January 11, 2021, 3:16pm UTC](https://forums.swift.org/t/differentiable-programming-for-gradient-based-machine-learning/42147/97 "2021-01-11T15:16:44Z")

</div>

> [@rxwei](#):
>
> Swift is missing a formal syntax and semantics for noescape results

I think the ownership system, when fully elaborated, may effectively give us noescape results. A yield'ed borrow of a non-copyable type is, for example, non-escaping. The problem is that closures are copyable. I haven't read up on the plans for making closures with mutable captures threadsafe, but one way would be to make them move-only. I bring this all up just to point out that there may be some interesting design synergies here that should be explored.

---

_[View the full topic](https://forums.swift.org/t/differentiable-programming-for-gradient-based-machine-learning/42147)._
