6 ms·
Swift is: 1) A fast general purpose systems language (like C++) 2) With high level semantics and usability (like Python) 3) With type system from funct
by taharvey 7y ago
Swift is:
1) A fast general purpose systems language (like C++)
2) With high level semantics and usability (like Python)
3) With type system from functional programming (like Haskel)
4) With concurrent memory model (like Rust)
5) That uses compile-time analysis for static guarantees
6) That runs everywhere from CLI scripting to ML to App devlopment
7) With a huge user base (millions of devs)
8) And two large corporate backers (Apple & Google)
9) The developers include the originators of Rust and the developers of LLVM & Clang.
Thats a killer list. And Julia only addresses 1 & 2.
It is further believed by the core group at Google and Fast.ai (and history) that the future must be a static type checked language to scale beyond the script-level experimentation of python to large application development where the lines between ML, application, and system development will blur. Its will also be critical to next-gen performance breakthroughs and heterogeneous computing. And the type system provides a fully hackable language for fast experimentation.
Also Richard Wei, not Lattner, I believe initiated the project with his DLVM thesis... specifically because Swift was such a good fit and is so hackable.
- dual_basis 7y agoExcept it basically only runs on MacOS, which means that it doesn't have strong datacenter support, which means that it won't be used in any serious applications. It's also not dynamic, which is almost a must-have for exploratory data analysis. I will avoid a point-by-point rebuttal, mostly to avoid seeming too antagonistic, but Julia supports many of the other features on the list you provided, and (more importantly, for the case at hand) already has proven it's capability in the differentiable programming paradigm with Zygote.
- taharvey 7y agoYou apparently aren't familiar with Swift at all. I'd recommend exploring more before answering. Swift had Linux support since it open sourced 4 years ago. IBM, AWS, Google all have very performant server-side swift packages for manner of things from servers to protocols. Our company is using Swift for a Linux-only embedded environments. If you think the future is dynamic, you're not regressing the past, or the trajectory of the future. Dynamic languages keep a compiler from understanding the code. Compilers are just code optimization heuristics - like AI for developers. If you make a language and compiler that has a strong ontology for the intent of code (a type system), it can break code down into functional proofs, then understand how to optimize it and in ways that aren't possible in a dynamic language that breaks the chain of intent. Julia is still pretty niche at this point, and just recently got tools as fundamental as a debugger.
- eigenspace 7y agoYou apparently aren't familiar with dynamic languages at all. I'd recommend exploring more before answering. In particular, you seem to be conflating being dynamic with being interpreted. Julia is an incredibly dynamic langauage whose JIT compilation strategy is essentially lazy AOT compilation. As soon as a method is called the first time, that method and all it's inferred dependent methods are compiled down to very efficient machine code and run. If one writes statically inferrable code, all sorts of code optimization, theorem proving and eliding will be done just like in a static language. However, we also have the option to write non-inferrable dynamic code where the called methods depend on runtime values when needed. This will (obviously) come with a performance hit, but as long as you know what you're doing, it can be a great boon so long as you keep type instabilities outside of performance critical code. > Julia is still pretty niche at this point, and just recently got tools as fundamental as a debugger. Julia has had debuggers for ages. It's just that when 1.0 launched last year we moved to a new intermediate representation which broke all the existing debuggers. The old ones could have been updated, but it was decided that people wanted to start over from scratch having learned a lot of lessons from debuggers like Gallium.jl. Julia is indeed a niche language. However, in the field of scientific computing, compared to Swift's ecosystem julia might as well be python. Swift has no scientific computing ecosystem to speak of.
- taharvey 7y agoI'm not conflating. Just like Julia, Swift can JIT... after all both are built on top of the inventor of Swift's LLVM compilation environment. That is not what I'm talking about. Nor am I talking about dynamic dispatch. Swift supports 4 different dispatch models from static to dynamic, depending on how the compiler optimizes. What I'm talking about is a static type system. From Julia's documentation: "dynamic type systems, where nothing is known about types until run time". What is fascinating, is ML/AI developers develop deep infrastructure to support ontologies for their target problems, but then forget to adopt the same for their code tooling. You can go though a series of proofs to demonstrate that you can't extract intent from a language that doesn't enforce it. And what is possible in a language's future can be expressed by how much intent can be extracted. Like Julia, Swifts scientific computing ecosystem is still evolving. But keep in mind that Swift can call Python, C, objC & C++ directly, works in Jupyter notebooks, has already large general purpose open source library ecosystem.