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

Well, it certainly optimises my ability to get shit done if I don't waste it on subtle type-conversion debugging.


I don't know if this an argument for or against static typing and type safety but there are two sides to this coin.

In dynamic programming languages it is definitely easy to get shit done, at least initially.

However as a project progresses to the point where a lot of refactoring takes place and there's more than a handful of people working on it, a good static typing language will make sure that shit keeps on getting done and things won't break due to a subtle typing error. Things will be caught by the compiler even before you get running the test suite.


I agree.

In other words, automatic program-correctness check is a crucial feature if project goes larger. And type check is actually one of the simplest, easiest and fastest way to archive that.

But most dynamic languages doesn't provide type-check. Really sad.

Adding type annotation on dynamic language is a kind of best mix of two worlds, and Julia seems pushing this approach even further - JIT static types from type annotation.


That's a strong vs. weak issue, not a static vs dynamic issue.

  irb(main):001:0> 1 + "hello"
  TypeError: String can't be coerced into Fixnum
          from (irb):1:in `+'
          from (irb):1
          from /usr/bin/irb:12:in `<main>'


Static prevents type errors from propagating, which is particularly important when using generic functions. In ruby you can have a type error four functions back pass silently until you do something ungeneric with it, which makes debugging harder than it should be.


Hah! Agreed.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: