5 ms·
I had to write a little VB to maintain a legacy codebase at my first job. VB is long before my time, but at least from my perspective at that time, it was just
by datpuz 4y ago
I had to write a little VB to maintain a legacy codebase at my first job. VB is long before my time, but at least from my perspective at that time, it was just a gross language to me. Who on Earth would rather have to end a function block by typing out "End Sub" instead of a curly brace? And case insensitive naming? I don't remember much else about VB, other than the immediate and visceral reaction that I needed to find a better gig.
- TedDoesntTalk 4y ago> Who on Earth would rather have to end a function block by typing out "End Sub" instead of a curly brace It’s called BASIC because it’s more approachable to beginners. End Sub is not as strange to someone new to programming as a curly brace because it is almost English and less abstract.
- rbanffy 4y agoWhen I first used C I wondered who in their right mind would start and end blocks with a curly brace when Pascal used BEGIN/END and other languages had other nicer and more easily glanceable structure markers.
- wantoncl 4y agoThere's COBOL code at least twice, and possibly three times as old, that still runs billion dollar businesses every day, and likely will until you retire. VB has its quirks but during its heyday, it was substantially more productive and easier to use than pretty much anything else.
- tinus_hn 4y agoNo it won’t because Cobol programmers are basically impossible to come by today; when I retire they will all be dead. So unless you can somehow convince young talented programmers to abolish 50 years of advancements and go program in an antiquated language again, in a short while there will simply be no option but to finally migrate away.
- keithnz 4y agoI wouldn't be too quick to judge..... quick tell me what these braces close }}}} no idea huh? in VB, closing blocks will tell you what they are closing. So, not such a silly idea, just more verbose!
- kazinator 4y ago> tell me what these braces close }}}} The correct answer is: who cares. Those who do care write them like this: } } } The editor lines it up with what it closes. Closing blocks telling you what they are closing were a good idea in the era when programmers had to line up at a job submission window holding decks of punched cards. The reason is that blocks indicating what they are closing can assist the compiler in reliably recovering after syntax errors, continue parsing, so that you get as many useful diagnostics from a single compiler pass as possible. That is almost entirely irrelevant today, though.
- keithnz 4y agoyou may feel they are unnecessary, other people like it, and it definitely isn't from the age of punch cards. I like to watch people code on twitch, and the amount of times I see people get confused about what a particular closing bracket is closing is pretty regular. The other thing it allows is you can jump to all the closing tokens for IF statements in a file really easily. Way easier to write tools to extract certain things out of code files as well. While I don't mind curly brace blocks, I can definitely see the advantages of distinct tokens for different types of blocks
- shakna 4y agoLua, Ada, COBOL, Pascal, etc. There's a long list of languages in use across the industry that don't use C-style bracing. Then there are languages like Python that end without a statement due to differing whitespace.
- int_19h 4y agoPeople who use national keyboard layouts in which {} is not easy to type, for example.
- stormdennis 4y agoYou don't actually have to type out End Sub, the IDE does that for you. You just type in the new procedure's name and the ide gives you the skeleton with the cursor inside.
- AnIdiotOnTheNet 4y agoThere are a lot of eccentricities to complain about in VB, but somehow you have managed to only call out the features that were actually really common in a lot of other languages. What about 1-based indexing and On Error Resume Next?
- jhbadger 4y ago1-based indexing is pretty common among technical programming languages (R, Matlab, Julia, etc.) Not that VB is typically used for this, but people who think 0-based is universal have pretty much only been exposed to C and languages that copy its conventions.
- stormdennis 4y agoIt's 0 based by default, afaik, but you have the choice to make the lowest index whatever you want.
- kazinator 4y ago> Who on Earth would rather have to end a function block by typing out "End Sub" instead of a curly brace? Someone who has to wait 10 minutes in line before a job submission window, holding a deck of punched cards, just to find out their program has syntax errors, and then repair as many of them as possible before repunching the cards and lining up again. And that's about it.