| You 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. |
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.