DEV Community

Discussion on: JavaScript is not an untyped language

Collapse
 
mvasilkov profile image
Mark Vasilkov

that would result in a runtime error

Any error in JS is a runtime error, naturally.

What you're saying is that the only way a language can be typed is if it's a compiled language with all of the type info known at compile time.

Which leaves you with like... three programming languages or so.

You can trivially write code similar to your example in both C and Java, with the same runtime error. Not because they're untyped, but because their type system is unsound, which is, to me, a wholly different can of worms.