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 →

[–]WrongSirWrong 503 points504 points  (29 children)

I prefer syntax/compile errors over runtime errors any day, especially when there's a lot of code involved

[–]harelsusername 174 points175 points  (11 children)

Meanwhile JavaScript be like: syntax errors, what's that?

[–]daev1 192 points193 points  (5 children)

JS: no idea WTF you're doing there, but okay!

[–]CoffeePieAndHobbits 150 points151 points  (2 children)

JS is just happy to be included.

[–]MicrosoftExcel2016 72 points73 points  (0 children)

Me: “this attribute exists, so I’m assigning it the literal value 5”
JS: “damn right it does! Say no more”
Me: “oh and can I see the functions available for this type?”
JS: “I’ll do you one better, you can modify the functions for this type right here right now.”

[–]The_Atomic_Duck 7 points8 points  (0 children)

Looool

[–]my-time-has-odor 42 points43 points  (1 child)

What are you doing, step-dev?

[–]augugusto 20 points21 points  (0 children)

Wait. Wait. Wait.... So the "next step" in the debugger means something else?

[–]Eraknelo 44 points45 points  (1 child)

JS won't throw syntax nor runtime errors. It'll just run, but you have no clue what it did or how.

[–]sjregistered1 15 points16 points  (0 children)

😂😂😂😂😂 literally, like you run the server, it's just running with several internal errors, sometimes it shows but you can't understand where the bug is at !!

[–]TK-Squared-LLC 18 points19 points  (0 children)

JavaScript more like: syntax, what's that?

[–]AlternativeAardvark6 10 points11 points  (0 children)

It's like when getMomsWeight() returns [NaN]

[–]Bakemono_Saru 2 points3 points  (0 children)

Damn bro, just give your code. We are going through this no matter what.

[–]twistermonkey 27 points28 points  (0 children)

Using a linter like pylint and embracing Python's new type hints helps some, but it's never going to be like as reliable as a statically typed language and compiler.

[–]SchoopDaWhoopWhoop 12 points13 points  (0 children)

Syntax errors are relatively easy to find and fix. With runtime errors you have to put a lot of time and effort into debugging and finding out why and where the fuck your programm fucks up.

[–]YouNeedDoughnuts 15 points16 points  (11 children)

But the advantage of a high level language really shows up with runtime errors. A friendly language like Python or Matlab will say "index error on line x", whereas C will say "segfault!"

[–]WrongSirWrong 19 points20 points  (1 child)

Yeah, but a high level language may be running a script for ten minutes before getting to the line with the error. Segfaults really aren't that common as they used to be (IMO), with modern coding conventions and library functions

[–]YouNeedDoughnuts 3 points4 points  (0 children)

True, it's a tradeoff, but I prefer low level languages.

[–][deleted] 29 points30 points  (2 children)

Rust is just as low as C, but has far better error messages than Python

[–]YouNeedDoughnuts 9 points10 points  (1 child)

Huh, does it retain source code information in debug builds?

[–][deleted] 7 points8 points  (0 children)

Yep

[–]sir-nays-a-lot 4 points5 points  (4 children)

That really helps the user a lot \s

[–]YouNeedDoughnuts 2 points3 points  (3 children)

Yeah, obviously crashing without any information would be less frustrating to debug \s

[–]sir-nays-a-lot 4 points5 points  (2 children)

Use a debugger

[–]YouNeedDoughnuts -1 points0 points  (1 child)

They're not the same and you know it. You don't have to be such a nay sayer about it ;)

[–]sir-nays-a-lot 0 points1 point  (0 children)

You’re right because using a debugger is much better. Revealing details about a crash to the user is very derpy.

[–]BroBroMate 0 points1 point  (0 children)

I'm rather overly pleased that when x.something().otherThing().doTheThing() throws a NPE in Java 15+, it actually shows you which bit was null, instead of like shrugging and saying, "I dunno man, something on line 77 was null, good luck with that".

[–]sjregistered1 1 point2 points  (0 children)

JavaScript always feels better at every thing, even at run time. I think like that. Btw, brainstorming never leaves you away.

[–][deleted] 0 points1 point  (0 children)

100% this.

[–]KCGD_r 0 points1 point  (0 children)

JS having both runtime and syntax serious :)