▲ | munificent 4 days ago | |||||||
> The expression problem only arises in statically typed programming languages, it does not exist in dynamically typed programming languages. Wadler's list of requirements for solving the expression problem include "with static checking that all cases are covered", so in one sense, yes, dynamic languages don't have this "problem". But in another sense, dynamic languages simply have no chance to solve the problem because they don't statically check anything. It is true that it's much easier to do multiple dispatch and open-ended extension in dymamic languages. That's a nice benefit of them. But you do sacrifice all of the safety, code navigation, and performance of static types in order to get that. The problem Wadler is trying to solve is "how can we have this sort of open-ended extension in both directions without giving up static safety?" | ||||||||
▲ | adgjlsfhk1 4 days ago | parent [-] | |||||||
This isn't true. Julia manages to maintain good performance with multiple dispatch through lots of type inference in the compiler (and carefully written code in the language to preserve "type stability") | ||||||||
|