Skip to content
loading...

re: I'm Javascript. And I'm done taking your shit. VIEW POST

TOP OF THREAD FULL DISCUSSION
re: The only data type where the variable name and its value are correlated are symbols (or atoms, or literals depending on what the language you use c...

😅

Well, booleans can only be true or false. however, a variable named in a way that makes it seem like it should reference a boolean can, of course, be uninitialized if you allow uninitialized declarations. And I guess that's the thing; javascript by default allows you to declare uninitialized vars.

So; yes - javascript is useless at being java, c#, or any other strongly typed language, in the same way, those languages are useless at being javascript. But that's not really a fair comparison as they have traits not applicable to the other.

Nor did I say it was a fair comparison, nor did I even really say it's an issue (of any size).

But surely, you can see that - as was the intent of my reply to the other person, from an OO/strictly typed background, JavaScript is indeed very easy to get wrong. That's no different to any other language if we only have surface knowledge in them.

In other languages, such as Java, the primitive boolean datatype exists, and null exists, but a boolean can never be null, it is either true or false. Again, that's because of strict typing, and strictly typed languages simply make more sense in my head.

Does that stop me using JS? No... but you were curious, so I expanded on my comment.

I'm aware of how to use JavaScript, and do so more times than I'd like, so no need for the documents, or the defence of JS, but thanks.

There's no way to respond to that statement productively.

code of conduct - report abuse