Conversation

Is it possible/wise/ever done to have a bidirectionally typed programming language in which an arbitrary function (or rather, function name) can be declared to be an eliminator for one of its arguments, thus allowing some type-based overloading?
5
6
(This sounds very much like the type-based method resolution employed by Rust (and many other languages), although it's not available for *arbitrary* functions; method declarations and invocations both have distinct syntax from "free functions".)
1
Show replies