Hacker News new | ask | show | jobs
by sixbrx 3056 days ago
Is there anything in Julia yet or planned, that would allow to specify that "implementations" (in some sense) of an abstract type must provide certain method implementations, which would be checked before any attempt to call a missing function at run time (such as just after all definitions have been read maybe)? I realize that this issue can be thorny under multiple dispatch so maybe no solution is practical. But this is one thing from traditional single-dispatch statically typed OO languages that I really miss.
1 comments

Yes, there have been lots of discussions about this — typically referred to as "formal interfaces." This would be a 2.0 (or later) feature addition, and it's not yet certain how it would be approached.

https://github.com/JuliaLang/julia/issues/6975

https://github.com/JuliaLang/julia/issues/5