3 ms·
> Once you know the purpose of the '=' how often do you make mistakes reading or writing code? A nontrivial proportion of people who start trying to learn to p
by lmm 9y ago
> Once you know the purpose of the '=' how often do you make mistakes reading or writing code?
A nontrivial proportion of people who start trying to learn to program never get past that point, so it's worth taking them into account.
> at the end of the day, how often do you not know whether a particular variable is a string or an integer?
Strawman. Types are not about the difference between a string and an integer, they're about the difference between a user id and an order id, or a non-empty list and a possibly-empty list, or...
- bogomipz 9y ago>"Strawman. Types are not about the difference between a string and an integer, they're about the difference between a user id and an order id, or a non-empty list and a possibly-empty list, or..." Can you explain - how is the difference between a string and an integer different from the difference between a user id and an order id? You're calling the OPs comment a straw man but I'm not understanding how your examples are not the same thing given type system that understood all four of those.
- lmm 9y agoMany Ruby users don't realise that the type system can understand all these differences. How often do you not know whether a particular variable is a string or an integer? Not very often. How often do you not know whether a particular variable is a user id or an order id? Much more often. So if you think the only kind of difference a type system can tell you about is the difference between a string and an integer, you vastly underestimate the number of bugs that a type system could help you avoid.