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

I think the crux of the issue here is "triviality."

I claim that it is nontrivial to embed dynamic types in a statically typed language. Usually this is due to the need to add lots of explicit coercions in order to interface with all of the code is actually statically typed. I can embed a dynamically typed programming language in my statically typed language, with its own libraries, but that's hardly "trivial".

Difficulty matters. Otherwise I can claim that I can bypass memory safety by writing a simulator for x86 in a memory safe language, and, well, the code that runs might violate memory safety (in some alternate sense), and thus, there is no expressiveness sacrifice!



"lots of explicit coercions" - even without recourse to generics, the overhead tends to be small. Really, try it. There's no need to write intepreters, let alone architecture simulators.

I tend to think the attraction of dynamic typing is the ability to run incomplete or ill-typed programs. If we have type inference, there is no real advantage in terms of conciseness.




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

Search: