Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby
by ddragon on Thursday June 20, 2019 @06:03PM
(#20237844)
Julia's type system works to make the language more dynamic instead of more static, instead of one slow program in which types have to be checked at runtime a Julia program is a superposition of every optimized implementation of an algorithm and explicit types are used to access and manipulate a subgroup of implementations. So in general you don't use types to increase performance (the compiler already infers all types to generate fast code, including optimized union types for nullable fields for example), but when you want to restrict the polymorphism to work in more specific code.
But since the JIT compiler infers all types, regardless of explicit hinting, it's possible to create tools to evaluate all types before a function is called [1], which combined with the efforts in better precompiling the code (which increases the amount of code that will have the type inferred before running) could make some good tooling for compile time checking.
[1] https://nextjournal.com/jbieler/adding-static-type-checking-...
Re:Open-sourcing Sorbet: a fast, powerful type checker for Ruby
by dnautics on Friday June 21, 2019 @01:39PM
(#20244680)
> a Julia program is a superposition of every optimized implementation of an algorithm and explicit types are used to access and manipulate a subgroup of implementations.
That is an amazing description of what it is!
I've seen some talk of Julia doing compile time checks, maybe in the future it will?