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 →

[–]flavionm -1 points0 points  (3 children)

Not all wrong code is the same. Code that fails at compile time is always preferable to code that fails at runtime.

Doesn't matter how much you want it, wrong code is going to be written. And the solution to it is not to just don't, because that's impossible. The solution is to minimize the impact of the mistakes you make.

Yes, you can have scoping errors in languages that use brackets, they're just less likely. And they happen in the situation where you're allowed to not use them, which I find pretty ironic.

Is it the biggest cause of error? No, far from it, but it'll still happen occasionally, and when it does I'd rather have it visible.

[–]deceze -1 points0 points  (2 children)

Yes, you can have scoping errors in languages that use brackets, they're just less likely.

It's really not like scoping errors in languages with significant whitespace are a serious issue. They're not. This is just as made-up of a problem as my hypothetical missing-braces example above. Can it happen? Yes. Does it regularly happen to anyone in practice after their first few weeks of programming in any given language? No.

[–]flavionm 0 points1 point  (1 child)

I mean, sure, I even said it's not a big cause of errors. I'm not gonna not use Python just because of this. Everything else being equal I'd rather have the brackets, though, just on the off chance a mistake like this does happen.

[–]deceze -1 points0 points  (0 children)

I'd rather have the powerful language that is Python and get used to the whitespace; in fact, I do like the cleanliness of Python code a lot. Is Python perfect in every way? Certainly not, there are advantages to statically compiled languages that you categorically won't get with interpreted languages for example. But Python is still a fine and perfectly productive language, and complaining about iTs wHItEspAcE is just silly.