this post was submitted on 18 Jul 2023
746 points (93.2% liked)

Programmer Humor

41208 readers
26 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] MyNameIsRichard@lemmy.ml 105 points 2 years ago (3 children)

When JavaScript was first released, it was a god-send. The alternative was vbscript and if you think JavaScript is bad...

[–] lucidwielder@kbin.social 28 points 2 years ago (1 children)

Very true. I remember vbscript. I still have to write some occasionally. What’s funny is that powershell gets all the attention & security applied to it - but vbscript likely keeps its flaws in the name of backwards compatibility. I’m betting vbscript is a huge attack vector just waiting for some major exploitation that leads to its removal or being severely gimped.

[–] GlitchyDigiBun@lemmy.dbzer0.com 7 points 2 years ago (2 children)

I assume vbscript is not Visual Basic? That was my first thought and I find that quite easy to grasp

[–] allywilson@sopuli.xyz 14 points 2 years ago

Correct. You know how JavaScript is not Java? Same thing. If memory serves me correctly there was a bit of a race to be the next Windows script language between NT4 and 2000 (to replace batch), and it was between VBScript and Kixtart (the former won out).

[–] MajorHavoc@lemmy.world 1 points 2 years ago

Correct.

To get a feel for what VBScript was like, think of Visual Basic. Now throw out all the good bits and mix in a bunch of JavaScript style quirks.

Then try to parse binary data packets with it, beacuse XML isn't widely supported and JSON has not been invented/discovered yet.

It was bad.

[–] Demonicwolf227@lemmy.fmhy.ml 15 points 2 years ago

Yeah, everyone hates JS but that doesn't mean the existence of JS is a curse. For a long time it has been the best at what it's commonly used for. Otherwise no one would complain about it because no one would use it.

[–] joel_anderson@lemmy.world 9 points 2 years ago (2 children)

All I remember about vbscript was that array indexes started at 1.

[–] MyNameIsRichard@lemmy.ml 11 points 2 years ago (2 children)

I just remembered option base 0 :-)

[–] outdated_belated 7 points 2 years ago

Wow, they found something even more confusing than 1-indexing (conditional 1-indexing)

[–] andrew@lemmy.stuart.fun 5 points 2 years ago* (last edited 2 years ago)

option base 42

Sadly, per the syntax docs on O'Reilly it doesn't look like it can be anything but 0 or 1. That's not to say it's a good feature, but at least make it fun if it's gonna be bad.

[–] MajorHavoc@lemmy.world 1 points 2 years ago

That's such a perfect summary of VBScript. Starting array indexes at 1 was it's vibe.

VBScript would show up for it's first day as a construction worker in a white shirt and a tie. I loved VBScripts willingness to do messy work, but boy was it unprepared in many contexts.