220 karma · joined December 6, 2017
Edit: I see you're going to have protocols/ traits. Can those be specializes/monomoprhized at function call time like Julia abstract types?
And how about function specialization? Will functions be attached to structs in a single dispatch fashion or free floating multimethods?
Google has a fairly sizable team around it, it has a fast path to adoption by the large pool of swift devs and fast.ai, and of course, google hype.
Chris leaving doesn't seem to be an issue: https://twitter.com/clattner_llvm/status/1222032740897284097
Here's a revamp based on protocols https://github.com/apple/swift-numerics
Though isn't point (2) just a convention thing? Protocols can refine other protocols. So in S4TF there's a layer protocol and an RNN protocol which extends that, IIRC.
See here: https://white.ucc.asn.au/2018/10/03/Dispatch,-Traits-and-Met...
So this is about extending types, but it sounds like swift is strictly "better" then, since it's also statically checked? Or is there something that multiple dispatch gives that substantively better?
I'm trying to get a feel for if the Swift for Tensorflow project will afford the same kind of composability, while keeping static type checking, modules etc (assuming they work out cross module code specialization, which I think is happening).
All those pretty function like things you see above are actually callable objects that can be introspected, intercepted and dispatched on...so you can mix and match pure object abstractions, pure function abstractions and objects with function like properties depending on the usecase.
This is because Julia's philosophy is to make Differentiable Programming a completely seamless and normal programming paradigm inter-operable with all standard code patterns.
And all this is only possible because of a unique mix of amazing reflection, code gen (including hooking into the compiler from third party packages, allowing source to source autodiff and GPU codegen), fast generic/parametric polymorphism even across packages, multiple dispatch and macros, among other technologies.
It's not quite at the stage of "write any normal julia code and it just works", as there are some rough edges being worked out, but that's the vision and it's even now it's leaps and bounds above pytorch.
Jeff Dean seems to disagree.
Also, I think it hasn't picked up steam because it just isn't mature enough yet
Any specific examples?
The AD stuff is hardcored into the C++ guts of the compiler, whereas Julia's source to source autodiff accesses a compiler pass from a fully Julia user package.
Aside from making it easier to hack and improve the AD system as just a Julia user, this capability enables other package program transforms like that in https://github.com/MikeInnes/Poirot.jl for prob programming.
So Julia is already further ahead in that regard and it's more hackable.