3 ms·
I fully agree and have been advocating for the introduction of traits/protocols/concepts or some such thing in Julia. But the problem is not that Base is untype
by Certhas 5y ago
I fully agree and have been advocating for the introduction of traits/protocols/concepts or some such thing in Julia. But the problem is not that Base is untyped in the current type system, it's that the type system is not expressive enough to talk about the information you want to talk about.
Map should have type
map(f : T -> U, arr : Iterable{T}) -> Iterable{U}
None of that can be expressed in the Julia type system as is. There is no AbstractCallable type that functions would be subtypes of, and there is no Iterable trait (AbstractArray comes closest but without multiple inheritance of AbstractTypes you can not rely on it).
- neolog 5y agoYeah that's exactly what I'm saying.
- adgjlsfhk1 5y agoOne thing that makes this very difficult is that fancy types like this seem like they might make the specificity algorithm a complete nightmare.