DEV Community

Discussion on: JavaScript is not an untyped language

 
peerreynders profile image
peerreynders

Thank You for your explanation which establishes the context from which the statement "JavaScript is untyped" makes sense.

This is why I don't get how someone, arguing in good faith, can point out that JavaScript is a typed language.

My interpretation of this article is that it is trying to address the case where the statement "JavaScript is untyped" is made while the not having the strict definition of "types" as you present it (and people reading and running with it).

I personally stick with statically and dynamically typed for practical reasons but all too often come across dubious uses of "weakly typed" and "strongly typed" where "untyped" isn't being used to state "without static analysis" but to imply so fundamentally unreliable, it might as well just be operating on a sea of strings.

There seems to be an ongoing oversimplification

  • statically analysed = safe and correct (e.g. type safety)
  • dynamically typed = absolute garbage

My position is that I am constantly thinking in "types" even when working with a dynamically typed language.

Thread Thread
 
miguelmj profile image
MiguelMJ

Thanks for the link. I'll take my time to contrast that with my own and try to contextualize how and when the each terms appear. Thanks once more for the discussion!