3 ms·
The original motivation was providing a single way to deal with a combination of default arguments, optional arguments and the sort of homebrew polymorphism tha
by adam-a 13y ago
The original motivation was providing a single way to deal with a combination of default arguments, optional arguments and the sort of homebrew polymorphism that a lot of libraries use, where a function takes 4 different types of thing and runs through a bunch type tests before doing anything.
For functions with longer parameter lists this should hopefully be more readable too. It's clear what types can be passed to a function.
Out of interest, what other libraries like this have you seen? I did a quick check myself and couldn't find anything comparable.