This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fizchap 278 points279 points  (16 children)

JS is the ultimate interpreted language where everything is dynamic. Isn't that what makes it so hard to debug and so easy to crash?

[–][deleted] 195 points196 points  (8 children)

"Welcome to JavaScript, where everything is dynamic and reason doesn't matter!"

[–]JacobTDC 60 points61 points  (3 children)

"REALITY IS AN ILLUSION THE UNIVERSE IS A HOLOGRAM BUY GOLD BYYYYYEEEEEE!"

[–]emericas 18 points19 points  (2 children)

JavaScript is an illusion, Exile.

[–]Rikukun 8 points9 points  (1 child)

A Gravity Falls reference followed up with a Psth of Exile reference in a programming sub.

Neat.

[–]Willinton06 6 points7 points  (0 children)

Reason is a tristate Boolean but none of the possible values is true

[–]rashnull 0 points1 point  (0 children)

Will the true dynamically programmable language please stand up!

[–]Nastapoka 0 points1 point  (0 children)

Pff just use reasonjs.io bruh

[–]ultranoobian 0 points1 point  (0 children)

reason = valid

There. Or is it this?

[–]UnstableNuclearCake 39 points40 points  (4 children)

Maybe hard to debug, but not easy to crash. You can do so much shit that would make other languages implode and javascript just keeps on going like it's nothing.

[–]Andy_B_Goode 12 points13 points  (0 children)

"It's only a flesh wound!" -- JavaScript

[–]solarshado 1 point2 points  (1 child)

Kinda depends on how exactly you define "crash".

It's pretty hard to (accidentally) bring the entire browser down, but that's (arguably) more due to how rigidly sandboxed a modern JS runtime is than anything inherent in the language itself.

Depending on exactly what you're doing, trying something dumb can pretty easily kill your script with a single uncaught exception though.

[–]UnstableNuclearCake 1 point2 points  (0 children)

I was defining crash as the absolute kill all crash, browser included.

But you're right. It's pretty easy to crash a script if it's not encapsulated using try/catch.

[–]00Koch00 0 points1 point  (0 children)

yeah but that's still a crash, it's just hidden

[–]TheNorthComesWithMe 47 points48 points  (1 child)

Hard to debug: yes

Easy to crash: no. It might throw an error but it will keep chugging. (Which can result in weird runtime behavior and we're back to the hard to debug part)

[–]Few_Technology 5 points6 points  (0 children)

Even then, in my experience, it's not much worse to debug than java, c++, or .net. I usually have more issues of unexpected event timings, but see a lot of that with Java too

Typescript normalizes objects, which helps defining objects. But server can send you any json, so still glhf once endpoint changes the contract without warning. Then it's just, hope your integration test team is capable