Matthew MacDonald
2 min readAug 24, 2019

--

For another, my peers are apt to be on the same project, program, or contract and thus have access to the same compilers and run-time systems that I do.

Of course, but put yourself in the position of a teenager or hobbyist coding for the first time. The ability to say “look at what I did here” rather than “please install this” is significant.

Yes, and I can point to a single major feature that does so: weak typing. Using a language that does not have strong typing inculcates bad habits; it’s a crutch, a wheelchair, a dangerous shortcut. If you know that a variable is a certain type, you should say so, explicitly and with explicit range, dimensionality, accessibility, etc. If you know that some code needs to use the value of that variable as if it were another type, you should write the code that converts it, explicitly. This is how you tell other people who will be seeing your code what you were thinking when you wrote it.

I agree with this wholeheartedly. That’s why I made this concern first in my list (“1. JavaScript isn’t typesafe”). My solution was to rely on the type-checking of TypeScript — and, essentially, to ask the IDE to do the error-checking work. You could point out that if the language did this itself, I wouldn’t need to rely on the IDE, and you would be right!

That said, there seems to be a bit of a move away from strong typing in recent years, as seen in languages like Python. I personally like a language that forces you to be as virtuous as possible. Does JavaScript come up short in that area? In my opinion, it does.

--

--

Matthew MacDonald
Matthew MacDonald

Written by Matthew MacDonald

Teacher, coder, long-ago Microsoft MVP. Author of heavy books. Join Young Coder for a creative take on science and technology. Queries: matthew@prosetech.com

Responses (1)