• HStone32@lemmy.world
      link
      fedilink
      arrow-up
      12
      arrow-down
      1
      ·
      5 months ago

      “It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”

      -Edsger W. Dijkstra

    • Skull giver@popplesburger.hilciferous.nl
      link
      fedilink
      arrow-up
      11
      arrow-down
      2
      ·
      5 months ago

      C is a terrible language, but it’s at least reasonably concise and readable when you need to punish it into doing what you want without crashing.

      VBA is clunky for just about everything it does, because it tries to be as readable as SQL but fails miserably. I’ve never found out why all it calls all of my variables dim but it sure doesn’t provide reasonable code.

      You don’t get the memory corruption you get when writing C code (though you can make it happen) but it’s just not a very suitable language for just about anything. It tries to take the easiest thing in programming, the syntax, and optimising on making that easy.

      The biggest problem with VBA is that it’s abused by office workers that need a real application but can’t and won’t get any time and budget to make or acquire one. You end up with the world’s shittiest code imaginable, written by people who aren’t programmers, driven to desperation. Opening someone else’s VBA code is like opening someone’s browser history, no matter how good your opinion of them is, you’ll find something that’ll make you question your view about them if you scroll long enough.

      The “real programmers” that like writing code full of memory corruption and null pointers have a hate boner for everything that tries to make their job easier, probably because they feel like they’re only valued for being able to write code and afraid of being found out. Visual Basic 6 allowed Junior programmers to write applications that worked fine for literal decades in a week, while any “hardcore” developer would’ve taken a month getting the string validation right.

      The same senseless hate is also present with PHP, where the arguments against the language usually come down to “I don’t like the syntax” and “this ten year old code base I used it in once was super bad”. VB also has the downside of being slow, although with VB.NET you can write powerful VB applications that perform as well as their C# counterparts.

      I tried to go back into VB after learning other languages but I just can’t think of any way in which it’s a better choice than something like C#. The Basic ecosystem Microsoft set up, where you can throw together an application in minutes and it just works, is absolutely amazing, and something I still miss on Windows every day. The language itself, with all of its quirks and stupid syntax structures, I don’t.

      One thing I’ll give VB is that it has the most hilarious but sometimes quite practical error handling statement I have ever seen (ON ERROR RESUME NEXT) that will literally ignore any error and just keep on trucking. Whenever I see three levels of methods try/catching each other and passing error objects along at the very end, I long for an ON ERROR RESUME NEXT that would just let me do all of the error handling at the very end.

      • Jayjader@jlai.lu
        link
        fedilink
        arrow-up
        2
        ·
        4 months ago

        In case the “dim” comment isn’t a joke, as I recall it’s short for “dimension”, as in you are specifying each variable’s dimension in the computer’s memory. Source: some “intro to programming with vb6” book I read like 15 years ago at this point.