Re:Experiment: Unit testing isn't enough; You need static ty...
by gnuvince on Wednesday June 20, 2012 @01:08PM
(#4137904)
> Disadvantage is more verbosity, but it's a trade-off.
When I was learning Haskell, I wrote a program to count the value of a cribbage hand. The code was half the length of an equivalent JavaScript program.
The expressiveness of a language has more to do with the length of a resulting program than static or dynamic typing.
Re:Experiment: Unit testing isn't enough; You need static ty...
by Peaker on Wednesday June 20, 2012 @12:37PM
(#4137744)
The claim static typing adds verbosity is a common fallacy.
Haskell code is more concise than most dynamically typed languages.
Re:Experiment: Unit testing isn't enough; You need static ty...
by eta_carinae on Wednesday June 20, 2012 @06:55PM
(#4139599)
> Disadvantage is more verbosity
Type inference cuts down the verbosity tremendously.
Re:Experiment: Unit testing isn't enough; You need static ty...
by papsosouid on Wednesday June 20, 2012 @12:41PM
(#4137770)
>Disadvantage is more verbosity
How so? Java is verbose, but that isn't due to being statically typed, it is just a verbose language. Statically typed languages with type inference are no more verbose than dynamically typed languages.
With dynamically typed languages I find that you still need to worry about types, but you have to trace through the code to figure out what type a particular variable is (esp. if you're not the only one working on a project). In a statically typed language that information is readily available.