So... Is Visual Basic officially dead?
-
VB.NET and VB, probably are dead-ish as everyone above has discussed. VBA, which is VB for Office apps, is most definitely not.
Bond Keep all things as simple as possible, but no simpler. -said someone, somewhere
-
When I attended Microsoft Ignite in 2019, I won a t-shirt that said "Kill VB, before it kills you!" Sounds like someone at MS saved my life :laugh:
-
They meant Visual Basic 6 - at that time. MS's goal was to replace VB6 as a stand-alone application with VB.Net as part of what's now Visual Studio.
-
When I was in high school, some wizard wrote a Fortran program nicknamed The Black Death. It entered an infinite loop that printed solid lines of asterisks. It was soon outdone by The White Death, which entered an infinite loop that "printed" form feeds.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.My favorite was a program that recursively created a bunch of folders with names borrowing characters from the extended ASCII set in the user's home folder. That was back in the Novell Netware days, working on DOS, so you couldn't easily batch-delete folders. I just left the program in my share (everybody's folders were public to everyone). I wanted to prove that idiots will run unknown EXEs from unknown folders...and they did not disappoint. Eventually the admin got tired of calling out people asking why they had a bunch of non-sense folders eating up his disk space.
-
I'm working for a customer who uses Visual Basic. VB was my first language so I don't mind too much, although after years of C# it feels a bit bloated and archaic at times. I still have another VB project as well, so at least I knew what to expect. It's an old web forms project though, so all in all it's pretty meh X| So anyway, I had to start a new project (not something they do often, they basically have the one monolith) and thought I'd pick a VB project template since that's what the client is using. I have VB templates for WPF, WCF, Console, Library, WinForms and Test projects But as soon as I filter on the more modern project types, like Web, Web API, Cloud, Games or Blazor, I get zero templates. Ended up picking C# instead, as those are readily available. I remember reading Microsoft isn't actively developing VB anymore and I'm pretty sure the earlier version of .NET Core did not support VB. When googling the subject I find a mix of "VB dead" and "VB coming to .NET (Core)", but evidence would suggest it never actually came to .NET (Core). All in all it seems to me like Microsoft pulled the plug or is this wishful thinking?
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
No, the tooling is still available, it's just no longer obvious: How to Do Web Forms in VS 2022 (Even Though Microsoft Recommends Blazor/.NET 6) -- Visual Studio Magazine[^]
-
I'm working for a customer who uses Visual Basic. VB was my first language so I don't mind too much, although after years of C# it feels a bit bloated and archaic at times. I still have another VB project as well, so at least I knew what to expect. It's an old web forms project though, so all in all it's pretty meh X| So anyway, I had to start a new project (not something they do often, they basically have the one monolith) and thought I'd pick a VB project template since that's what the client is using. I have VB templates for WPF, WCF, Console, Library, WinForms and Test projects But as soon as I filter on the more modern project types, like Web, Web API, Cloud, Games or Blazor, I get zero templates. Ended up picking C# instead, as those are readily available. I remember reading Microsoft isn't actively developing VB anymore and I'm pretty sure the earlier version of .NET Core did not support VB. When googling the subject I find a mix of "VB dead" and "VB coming to .NET (Core)", but evidence would suggest it never actually came to .NET (Core). All in all it seems to me like Microsoft pulled the plug or is this wishful thinking?
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
Public Sub btnOK_Click(s as Object, e as EventArgs) handles btnOK.Click End Sub versus btnOK.Click +=new eventhandler(btnOK_Click); // always miles away from the code, if you hand code it and accidentally make VS handle it for you in the GUI you can break your form until you fix it by hand in designer.cs You can even declare this in VB Public m_OK as Button WithEvents ' and the above vb code still works fine. So I think in general VB.Net handles events much more elegant than C#. I've got a huge c# app that has only hand coded "+= new eventhandlers, none were established with the crazy c# GUI. I think it's just too much of a PITA to maintain the code base with the GUI because I have both GUI drag drop controls on forms and many, quite a few, of the embedded form controls where in VB I used to get to say "withevents" with ease. This app was originally written in VB.Net and it was a PITA to convert it! Most of my other c# apps use a combination of hand written events and GUI maintained ones. I coded in VB for the Navy starting in 1995 up until 2017 and only after retiring did I start using C#. I absolutely depend now on C# syntax being close to my old friend c && c++ which I have been using since 1987. VB requires so much typing... Coding in Assembler was like running naked on a tropical island! We can only dream about such unbound less freedom.
-
Public Sub btnOK_Click(s as Object, e as EventArgs) handles btnOK.Click End Sub versus btnOK.Click +=new eventhandler(btnOK_Click); // always miles away from the code, if you hand code it and accidentally make VS handle it for you in the GUI you can break your form until you fix it by hand in designer.cs You can even declare this in VB Public m_OK as Button WithEvents ' and the above vb code still works fine. So I think in general VB.Net handles events much more elegant than C#. I've got a huge c# app that has only hand coded "+= new eventhandlers, none were established with the crazy c# GUI. I think it's just too much of a PITA to maintain the code base with the GUI because I have both GUI drag drop controls on forms and many, quite a few, of the embedded form controls where in VB I used to get to say "withevents" with ease. This app was originally written in VB.Net and it was a PITA to convert it! Most of my other c# apps use a combination of hand written events and GUI maintained ones. I coded in VB for the Navy starting in 1995 up until 2017 and only after retiring did I start using C#. I absolutely depend now on C# syntax being close to my old friend c && c++ which I have been using since 1987. VB requires so much typing... Coding in Assembler was like running naked on a tropical island! We can only dream about such unbound less freedom.
Yeah, I never use events in web development. Preferred the VB way when doing WinForms development.
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
-
I don't believe most of the people making comments especially the most negative have ever written anything in VB much less VB.NET. I understand why people might prefer C# if they are coming from C programming background. Moving to VB.NET was a big change from VB6 as I needed to learn about OOP. I wonder how many replying even know that VB.NET is OOP. I have been using visual basic since about 1992 VB3 thru VB6 and Visual Studio 2017 VB.Net. I write code to test hardware that I design. Over the years it has been radios for the military and Aviation. I like VB and currently VB.Net because anyone with some programming exposure can read my code like a test procedure.
pmarshall
Yeah, I never got the hate either. Although I currently don't like the VB.NET syntax, I can write the same code in VB as I'd write in C#. It uses the same framework, the same OOP concepts, the same language constructs... The only thing I hate, and which causes a lot of headache later on, is that Option Strict is Off by default, effectively making VB.NET a weakly typed language. As you said, anyone with some programming exposure can read it and will at some time try their hand at it. So the language has lots of weakly typed programs written by beginners. Not really the language's fault, but I think that's what most people have against it. Personally, I've never seen a well written VB.NET application. On the other hand, I've seen very few well written C# applications either :~ Most programmers just aren't that good :sigh:
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
-
Yeah, I never got the hate either. Although I currently don't like the VB.NET syntax, I can write the same code in VB as I'd write in C#. It uses the same framework, the same OOP concepts, the same language constructs... The only thing I hate, and which causes a lot of headache later on, is that Option Strict is Off by default, effectively making VB.NET a weakly typed language. As you said, anyone with some programming exposure can read it and will at some time try their hand at it. So the language has lots of weakly typed programs written by beginners. Not really the language's fault, but I think that's what most people have against it. Personally, I've never seen a well written VB.NET application. On the other hand, I've seen very few well written C# applications either :~ Most programmers just aren't that good :sigh:
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
I just about always have Option Strict On and Option Explicit On.
-
I just about always have Option Strict On and Option Explicit On.
Yeah, me too. It's a setting in Visual Studio, under VB Defaults. I don't use VB anymore (if I don't have to), but I still set it to on, just in case.
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
-
That syntax is never appropriate, because you are swallowing exceptions and have no way to find out they occurred, much less what might have caused them. At the very least, log the error detail before you swallow it - but then it wouldn't be
On Error Resume Next
, would it ..."I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
OriginalGriff wrote:
have no way to find out they occurred
not true, in code with "on error resume next" you can check err.number to see if it is non zero after every statement if you want and also access the error description you can then clear the error (err.clear) and carry on it is a useful tool if used properly
-
OriginalGriff wrote:
have no way to find out they occurred
not true, in code with "on error resume next" you can check err.number to see if it is non zero after every statement if you want and also access the error description you can then clear the error (err.clear) and carry on it is a useful tool if used properly
I was literally reading to see that someone added this. This is EXACTLY true, and the right way to proceed. in fact, in debugging, we would paste in a block to help us iterate out and determine which errors to trap! It wasn't always 5... LOL
-
VB is still far better at parsing stringly typed data sets than any other language. The C* functions in VB hide hundreds of lines of code complexity for parsing strings into fundamental data types.
Agreed. VB wasn't perfect for ~everything~ but it was Rapid Application Development at its best. The massive simplification of otherwise gangly code with all of it's built in functions is what made it so friggin' popular. VB6 was the most used programming language on the planet when MS pulled the plug and VB.NET was in the top 3 when MS just started drifting away from supporting it. Amazing how you can have a product so popular and just chuck it...twice. Dumping the language like that is what makes me not trust investing time learning and collecting code for anything proprietary to MS. No customer loyalty.