Optional variable declarations

Not really: multiple dispatch allows writing genetic generic code where different types implement the same abstraction in different ways — the correct implementation of the same abstraction is selected. What you’re proposing is that different return types allow the same function name to mean different things based on how you call it, which is actually the opposite of how multiple dispatch should be used: one generic function, one meaning.

3 Likes