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

The only benefit I'm aware of is slightly faster code and even then the dynamic version is almost always more readable and easier to maintain and refactor. The ideal would be a dynamic language with optional static typing but I have yet to see a language like that.


"slightly faster" is a bit understated, you're usually talking about statically typed languages being an order of a magnitude faster for things that are computationally expensive. Granted most things aren't, so for a web page or whatnot, it probably doesn't matter; and certainly the expressive ability you gain from dynamic languages might be worth the trade off. But the trade off is undeniably there.

(Try comparing various languages here: http://shootout.alioth.debian.org/u32/benchmark.php?test=all... if you don't believe me)

Some dynamically typed languages can approach the speed of static languages, like Lisp, but they generally do that by introducing voluntary static typing hints, or having a JIT compiler introduce speculative code paths that guess the types coming in after some analysis.


> The ideal would be a dynamic language with optional static typing but I have yet to see a language like that.

That would be Common Lisp.


That would be Common Lisp.

There was such a version of Smalltalk called Strongtalk, but it never got a community behind it.


Actually - "but then the Java phenomenon happened and we eventually had to switch to Java before ever releasing it".

http://www.strongtalk.org/history.html


I'm waiting for perl 6.



You should look into typed racket.




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

Search: