|
|
|
|
|
by jamiltron
4108 days ago
|
|
> And makes your code 20% longer Not necessarily true, especially if you are using a language with type-inference or you are able to encode your logic in types. Additionally - what do you think unit tests are? They aren't additional code you have to write? I'm not someone who thinks types completely reduce the need for testing, but I absolutely do not get why dynamic language fans are like "Uhg, I HATE having to write types", but then end up basically reimplementing a type system in a much more verbose testing framework. |
|
I agree that it is not necessarily true, but the languages which manage to squeeze in static typing and still end up with programs that are shorter and sweeter than python's are all fairly niche right now, which carries its own set of problems.
>Additionally - what do you think unit tests are? They aren't additional code you have to write?
Never denied it for a second. There aren't any languages which don't require unit testing though, and there probably never will be. Let's not pretend otherwise.
>I'm not someone who thinks types completely reduce the need for testing, but I absolutely do not get why dynamic language fans are like "Uhg, I HATE having to write types", but then end up basically reimplementing a type system in a much more verbose testing framework.
I've never done this.
I'd wager that the amount of code I have to write, including tests, is less than in all other practical languages. Often much less. That is very valuable.