Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Tooling and performance are two largest advantages. Disadvantage is more verbosity, but it's a trade-off.

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.



> 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.


The claim static typing adds verbosity is a common fallacy.

Haskell code is more concise than most dynamically typed languages.


> Disadvantage is more verbosity

Type inference cuts down the verbosity tremendously.


>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.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: