These really are amongst the most common rookie mistakes, but I take issue with the "no block level scope" part.

I've been programming for near on four decades, and the statement "Most programming languages" in regards to block level scope? BULLCOOKIES.

Maybe it's because I've always thought that C and C dialect was trash for a whole host of reasons, but the majority of languages I've dealt with have function level scoping and nothing else. Pascal, Modula 2, Ada, PHP, JavaScript... Hell, a good chunk of languages don't even (or didn't when I was using them) have scoping. See line numbered basic, Prolog, assembly, etc, etc.

Still pisses me off every time I have to deal with it when working on Arduino code; I end up just predefining all my variables just to avoid the headaches. But then as a asm/ada guy I think allowing code to define variables "just anywhere" was idiotic nonsense. Oh I can just make a variable in the middle of the code, how lovely... not!

I've always thought that block level scoping was painfully confusing and that dev's who "needed' or "wanted" it were likely just inept. Particularly when you get into the train wreck disaster they make of garbage collection since it makes every damned block need its own stack-frame.

But that I learned RCA 1802 assembler first, Basic second (it was useless) and Pascal third... and spent a decade working in Ada... I have a very different view on what good and bad programming is from the gibberish I'm hearing people parrot these days.

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store