Richard Wei

Results 61 comments of Richard Wei

> * Will tuples ever be differentiable? Extensions and protocol conformances for compound types (also called structural types) are part of Swift's roadmap: https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#extensions-of-structural-types. When this is possible, tuples of...

Thanks for bringing this up! Currently, we have no recommendation, but we would love to work on better IDE support with the Swift community. This is also a good question...

> It would be a shame programming without the autocomplete + error detection of the compiler. Absolutely. I'll look into CLion a bit and reply back.

> Could we instead have a more user friendly warning which says `consider using x.reshape() instead`, just my opinion that for beginners Library-provided error messages need to present alternative APIs...

There is not, unfortunately. I’m definitely seeing possible intensional uses in things like lazy tensor tests, but it appears to me that these warnings are only affecting the end user...

> @rxwei when I said `x.reshape()` I meant is there any way to have error messages with `.reshape()`. There is no way of doing so, unfortunately.

> @rxwei one last thing, what file would be appropriate to place these warnings in? This should be implemented modularly as part of [the raw operator generation script](https://github.com/tensorflow/swift-apis/blob/master/Sources/TensorFlow/Bindings/generate_wrappers.py).

Thanks for the write-up! I'll tag #322, [`Numeric.Magnitude`](https://forums.swift.org/t/removing-the-comparable-constraint-for-numeric-magnitude/26498) and [`AdditiveArithmetic`](https://forums.swift.org/t/additivearithmetic-conformance-synthesis-for-structs/26159) discussions on the evolution forum so that people looking at this issue can also get some context from those threads....

Happy to start with a discussion on the mailing list going forward!

I do not think passing Swift closures needs anything heavyweight like virtualization or type system changes. All we need is to get its function pointer and maintain the lifetime of...