2 ms·
If we're talking about making code easy to read, type signatures are one of the best tools. Many times you can look at the name of a function and its arguments
by Periodic 17y ago
If we're talking about making code easy to read, type signatures are one of the best tools. Many times you can look at the name of a function and its arguments and you have a very good idea of what it does.
This is unlike many dynamic languages where the returned value could be an object of just about any class. Are we getting a hash? An array? A custom class? Who knows without reading the details of the function.