DEV Community

Discussion on: JavaScript is not an untyped language

Collapse
 
peerreynders profile image
peerreynders • Edited

If there's something new programmers hate is error messages. I guess that's why I've seen listed as one of its advantages over other languages that JavaScript produces no type errors because it's an untyped language.

This may be useful for future reference:

"Scheme is dynamically typed. The lack of a type system means that we don’t have to spend energy on finding and explaining type errors with the same care with which we explain syntax errors. Better yet, when we use Scheme to teach design principles we can informally superimpose a type system and use the types for program design."

The Structure and Interpretation of the Computer Science Curriculum (2004)

i.e. the actual message is that dynamically typed languages are typically designed with a certain level of "type leniency" (for resiliency) which reduces the number of type errors the learner is faced with.

That's very different from "no type errors".


PS: It's interesting that it is a commonly held belief that statically typed languages are better for beginners given the additional guardrails that static type analysis can provide.

However it seems that dynamically typed languages may be better because REPL-driven programming provides a much more fluid feedback loop than the usual edit-compile-run loop can.

Collapse
 
miguelmj profile image
MiguelMJ

Thanks for your comment and support in general, @peerreynders. I've bookmarked several links you already shared, it's useful material.
Thanks again and sorry for the late reponse!