That seems a pretty logical way, to improve type inference, type stability and code clearity in the compiler.
Ross Tate presents a new class of type algorithm, that seems to solve some of the issues that the Julia compiler has (especially around inference and type stability)
Please consider summarizing and explaining what “this” is before proposing it, especially before pinging people. Not everyone has time for a 50 minute video.
I updated the link, to skip the section where he describes the problem that he is trying to solve.
I also thought well about it before tagging, as I consider it to be a major breakthrough in compiler design, and I am sure the responsible people are interested in it.
Just curios when he was talking about categories of types and their unions. Isn’t the same thing already been part of Julia with abstract type hierarchy and absence of multiple inheritance? Or there is more to it…
Watched a big chunk of the video. It’s mildly interesting, but does not appear to be applicable or useful in julia.
The thing he expresses as the problem he wants to solve doesn’t really exist in julia since we don’t have operator overloading, but instead have real dynamic dispatch, so it doesn’t actually matter for the semantics of the program in his example if x got inferred to Comparable{*} or to Any. Same thing for the thing he calls “overprecise initialization”, that’s just a non-problem in a language like julia.
Furthermore, our traits aren’t supertypes, so you wouldn’t even end up in the situation in the first place where x gets inferred to be an instance of Comparable{*}.
I guess in some sense, the way we handle traits is already an instance of this separation he’s discussing.
The “conservativity checking” he discusses is interesting, but I’m also rather skeptical if that can work for us since in almost all circumstances, you need to know concrete types to know what any given function will do.
His stuff about categorized unions isn’t applicable because we already have real unions.