I prefer VB. I have a degree in writing C#, I just find VB vastly preferable to work in.
I hesitate to believe Python would exist in the way it does today if Microsoft hadn't treated VB so badly. It's only now being replaced as the default to teach in schools because of its simplicity and readability.
This is very foreign to me, and I'm not a VB hater.
I spent a long time working in a codebase that was half C# and half VB.NET, and after a couple years I could switch between the two without thinking. VB has slightly more verbose syntax but that's about it, they're pretty interchangeable.
I don't hate `Dim foo As Boolean = True` but I wouldn't say it's more simple and readable than `bool foo = true;`.
I did this a number of times. I started working on a VB.Net source base around 2007 and started to introduce C# as soon as I could, then next job in 2013 was also a WinForms app that embedded some WPF and used mainly VB.Net and some C#. I have to say, C# feels a lot more productive for me. I can switch between C# and VB.Net easily, but some of the stuff VB.Net does makes no sense.
The 2007 project was a mess when I inherited it - the contractors who wrote it were based in India, and the code looked like a VB6 project. They had not turned on option explicit or option strict. They did not understand how events or event handlers worked - they added handles clauses to methods then assigned a variable with the current instance to make the events happen. It was bizarre. They also did a lot of horribly hacky things because all the variables were basically being treated as variant. There was even a bit of code where they had a select case statement where a Boolean variable was being used as a case... and I mean it was doing a select case on and integer, and one of the cases was a Boolean variable. So it depended on what that was set to as to what the case did. I turned on option strict and explicit, took a deep breath, and fixed the hundreds of errors. It was BRUTAL! I'm not saying this is something that is an issue with VB, that was down to the programmers not being trained properly and making some very bad decisions. But in C# it would have been very hard to make the same mistakes.
By the time I left the 2013 job in 2018, I had divorced myself from almost all of the VB.Net code and I swore I would never touch VB again. So far, so good.
I did the same, but based on the code style we used, more like `Dim foo = True` vs `var foo = true;`
Honestly, because of how much VisualStudio auto-completes code, the biggest practical difference that cause me grief was semi-colons: spend a day working in one language, and spend the next day constantly getting the other language wrong.
I remember back in maybe C#5 days there were somethings that I thought VB was nicer for (though I can't remember or find what they were now), but spending the last years working with modern versions (C#7.3 or C#8) there's nothing at all I miss from VB.
It's possible it has a "native language" effect to me. Like how if I want to speak another language, say French, I think what I am trying to say in English and then translate. VB syntax is well solidified in my head as what I am trying to do... and in most cases when working with any other language, I end up going "okay, so how is Select Case formatted in this language?"
I'm not saying VB is the best language, just that it's the one I find the fastest and most comfortable for me to work in.
Python and VB target very different audiences, is there something I'm missing here? Python is an interpreted dynamic language that turns into an unwieldy monster at scale, I believe VB was mostly fighting for Fortran and web devs.
It was, but never really became relevant because most people switched to C# + WinForms and never looked back.
As there was never (as far as I know) an easy way to migrate existing apps from VB6 to VB.NET, the main reason to use VB.NET would have been a preference for the BASIC syntax, which I don't think was ever particularly common, this was always just a loud minority. And a significant part of this minority also didn't like VB.NET because even this was too different from what they were used to.
Keep in mind the only 2 good GUI tools at the time, IIRC, were VB6 and Delphi. VC++ and stuff like MFC was overly complicated, and the Java stuff was garbage. As neither VB6 nor Delphi used a C-family language, you had a lot of people using them just because it was a better tool, not because of a preference for the language.
Python was built as an education/learning language first. It's popular because it's often a first language learned, and necessity in education/research space caused a lot of innovation over the years.
The only thing I like about VB (.Net) is that it supports XML literal notation... which was crazy useful in the mid-2000's when dealing with Flash (it's own XML literal notation) as a data passing option. I know others that utilized that feature well for Xaml applications.
I'd much rather just use C# at this point. Actually, I'd rather use JS (node/deno) or rust than C#.
> Python was built as an education/learning language first. It's popular because it's often a first language learned
That's my point. Colleges have been teaching Visual Basic as a starter programming language for decades. Only in the last handful of years have colleges started switching to teaching Python first... after many years of neglect by Microsoft. My local college still has an entire specialization of their CS degree based on VB.
Python is where it is today because Microsoft has steadily ignored the language that brought new CS students straight into the .NET world.
> Colleges have been teaching Visual Basic as a starter programming language for decades.
Where? In the US, university-level intro to programming would have been in Lisp, Forth, C, C++, and/or Java before possibly trying something else in the mid 2000s, but I struggle to imagine an American university strong in CS touching anything in the VB namespace (5, 6, .NET) whatsoever.
You struggle to imagine because you went elitist. "University level strong in CS", I said college. A lot of colleges teach Visual Basic. No, Ivy League schools might not, but a lot of colleges do. Heck, my community college taught a class for kids on it in the late 90s (my intro to programming) and still teaches college students a VB track today.
Well hey, I personally took a C programming course at the local community college, way back when, and have never met someone who learned VB outside of business/industry. Same way that Excel+VBScript are very useful but not taught as CS, but perhaps are covered in business classes. It occurred to me that your use of "college" might be the non-US meaning.
I have never heard anyone from any school in any country mention they used VB in school. Everyone I know who used VB, including me, learned it outside of school (either as a hobby or at work). I don't think VB in colleges was ever as widespread as you claim.
The two pieces of evidence I'd give you as proof of widespread use:
1. The r/visualbasic subreddit is constantly fighting people trying to use it for very low-effort homework help (just tell me how to do this problem, rather than asking for specific issues). It's literally every other post to the sub.
It is a thing for Excel courses. My sister was an accountant a few years ago and had to learn VB to write macros (because businesses are still stuck in the 80s)
Got my 2 year in 2010 at a local CC... they taught VB.Net and DB2 SQL on mainframes. I THINK they are moving towards more JavaScripty stuff but I'd not be surprised if the CC still teaches VB and DB2 Sql because local corporations still have the need.
That's kinda a nitpick. I have a game programming degree, where the majority of programming was C#. But local computer science programs also tend to have language-specific tracks available, like C# as well.
I hesitate to believe Python would exist in the way it does today if Microsoft hadn't treated VB so badly. It's only now being replaced as the default to teach in schools because of its simplicity and readability.