Hacker News new | ask | show | jobs
by ice109 3292 days ago
which language's run time cares about types?
2 comments

Any dynamic language - by definition, they check types at runtime.

Or, unfortunately, a lot of static languages. Any static language that allows type casting, for instance - that's the only way they can check whether a cast from a type to one of its descendants is valid (eg, in Java, casting an Object to a, say, URL).

Type information is used in JS engines to compile into native code. If type information is too vague or change you can have deoptimization[0]

[0]http://jayconrod.com/posts/54/a-tour-of-v8-crankshaft-the-op...