3 ms·
In rails or elsewhere in our code base, if I'm ever unsure what a function does or what it returns then I just jump to the function definition and read it, a si
by speleding 2y ago
In rails or elsewhere in our code base, if I'm ever unsure what a function does or what it returns then I just jump to the function definition and read it, a single key stroke in my IDE.
Now I need to fix a small bug in a library. Rather than wait for the library to be fixed I can monkey patch the fix into the library until it's fixed upstream. Trying to do that with a strongly typed language, you typically need to jump through all kind of hoops or end up fixing the problem outside your library or put some shim in between the broken library and your code. And then once the fixed library comes out you need to undo the code fixes on your side rather than just delete the monkey patch.
Sure I understand the benefits you list, but for me the effort put into strong typing, typing the stuff, changing it each time, just doesn't seem a worthwhile trade off because it's very rare for me to encounter a problem caused by a wrong type. Perhaps I would feel differently if I had to work on a poor code base with many people, but I don't.