4 ms·
I agree somewhat, but I'd rather call it their brain adjustment than a religion though. I think about 99% of people who suggest to slap down types onto dynamic
by shevy-java 10mo ago
I agree somewhat, but I'd rather call it their brain adjustment than a religion though.
I think about 99% of people who suggest to slap down types onto dynamic
languages have already been using types since decades, or many years,
in another language. Now they switch to a new language and want to have
types because their brain is used to.
- t-writescode 10mo agoNah. 99.9% of the people who wanted the addition of DryStructs to a codebase I worked on wanted it because they'd been bit, repeatedly, by someone sending one kind of object into a function rather than what the function accepted and it just not getting caught. A robust type system allows you to make "compiler errors" out of runtime errors. One of these takes *way more tests to catch* than the other. I'll let you guess which.
- ReflectedImage 10mo agoNah that's just a lack of understanding in the role of unit tests in dynamically typed languages.
- blandflakes 10mo agoElsewhere in this thread, dynamic typing advocates malign the hassle of maintaining types, and it is always coupled with strong advocacy for an entire class of unit tests I don't have to write in statically typed languages.
- ReflectedImage 10mo agoAnd that's the problem, if you want your code to actually work you do need to write those unit tests. A program not crashing doesn't mean it does the right thing. With experience you will learn to either write unit tests or spend the same amount of time doing manual testing. Once you start doing that then the unit tests just replace the static typing and you start shipping better code to your customers.
- blandflakes 10mo agoThis always feels like a bad faith argument. Nobody says that with static types, you don't need any unit tests. And your suggestion that people who like static types "don't know how to write unit tests" is further bad faith. Perhaps it's dynamic typing programmers who don't know how to write sound programs? Except I'm not making that claim, because I'm giving you all some benefit of the doubt, a degree of respect you are not giving others.
- ReflectedImage 10mo agoStatic typing doesn't have much value if there are proper unit tests. So it's fairly obvious that if people think there is value in static typing then they are shipping broken code to their customers. It's called ratting yourself out.
- blandflakes 10mo ago> Static typing doesn't have much value if there are proper unit tests Wasteful unit tests that assert your types are right don't have much value if there is a proper type system. > It's called ratting yourself out. Quit being childish.
- ReflectedImage 9mo ago"Wasteful unit tests that assert your types are right" You don't test whether the types are right, you test if your code actually does the right thing. That's what's important to your customers. The types getting tested is incidental.