Differentiable Programming Mega-Proposal

A few random comments, just my 2c:

  • I'm super +1 on proper metaprogramming support in Swift and Eugene and others are pushing on this, but I'm not aware of a reasonable proposal that can provide a good experience for differential programming. The fundamental issue is that we need type system integration, witness/vtable emission support, and other feature to make this feel swifty. Going with a 'fully dynamic' approach makes the feature feel like Python-esque, which is... not what we're going for.

  • Differential programming is not widely available in other languages, but I agree with others that this is a huge potential /differentiator/ (sorry, couldn't help myself) for Swift, in a key and growing market.

  • This is all "just math", and is intentionally well factored such that it applies to Float, Double and arbitrary other types, not just tensors or S4TF-specific things. S4TF is specifically trying not to create a fork of Swift or develop "tensor only" features. Our focus is on work that develops features that are important to audiences outside the established iOS developer ecosystem Swift is currently well placed in.

  • The proposal is much simpler (imo) than it looks from the manifesto. The manifesto starts with a deep dive on calculus and other background concepts, but the actual Swift language extensions are modest. I've asked Richard and Dan to develop a set of piecemeal proposals which can be considered ala carte, but it is important to also be able to see the "big picture" of where things are going, which is the normal role of manifestos in the swift-evolution process.

I expect the individual proposals to need iteration and we are committed to following the normal swift-evolution process. We're most interested in getting the best possible result (e.g. see the year+ we've been incubating this on a branch, plus extensive iteration in the face of user feedback!) rather than being in a hurry to "get something in" to any given release.

I'd love to see other big changes to the language get similar diligence paid to them.

-Chris

55 Likes