11 ms·
> Dynamic languages let you think a problem you haven't thought of at design time will somehow solve itself magically at runtime, using components designed week
by ergothus 7y ago
> Dynamic languages let you think a problem you haven't thought of at design time will somehow solve itself magically at runtime, using components designed weeks before, with knowledge of that time.
I think that's a misleading summary. Both dynamic and static languages suffer when it comes to changes over time (people will argue over which suffers more, but both suffer) so solving problems you haven't thought through is hardly a problem unique to dynamic languages.
- bsaul 7y agoOk so what is the benefit of dynamic / runtime binding, then ? Isn’t it to reach potential combination of components talking together in ways you couldn’t (or didn’t want to) anticipate at compile time ?
- ergothus 7y agoYour comment feels very aggressive and uninterested in actual debate. My primary benefit is not spending the time telling the computer things it should already know. Dev time is the most limited resource, I prefer not to spend it restating the obvious. And yes, sometimes this restatement could be complex to express. The biggest benefit I see most static typing advocates benefiting from is IDE-hints, not compile-time checking. But IDE hints aren't what people use to advocate for static typing. There are many reasons for different approaches - but if you want to limit it to a single thing, feel free. Just don't expect many people to be convinced, or even interested in your arguments.
- golergka 7y ago> My primary benefit is not spending the time telling the computer things it should already know. Sounds like you're in favour of type inference, not dynamic typing. A lot of statically typed languages don't need you to type out type declarations of your functions. > Dev time is the most limited resource, I prefer not to spend it restating the obvious. But on a typical dev job, you spend 10 times more reading code than writing it. And when you read, these type declarations actually save your time. > The biggest benefit I see most static typing advocates benefiting from is IDE-hints, not compile-time checking. Uhm, no? I'm pretty sure it's about the guarantees that compiled languages give you - the more invariants, the better. The same logic as with immutability.