3 ms·
And honestly, VB6 and VB.Net both get a bad rap. VB6 excelled at what it was designed to do, it was an easy-to-use language that was the fastest way to get a G
by Pxtl 13y ago
And honestly, VB6 and VB.Net both get a bad rap. VB6 excelled at what it was designed to do, it was an easy-to-use language that was the fastest way to get a GUI up onto the screen and throw together a simple program. I learned on VB4 and it was great. It was the whole COM thing and the serious enterprise perversions of it that ruined the language.
VBA and VBScript, on the other hand, are abominations - the lack of an exception system is excruciating.
VB.Net is basically a few #Defines away from C# and has most of the nice functional features of C# they added in .NET 4.0. It's easy to read and powerful. Plus, the "Handles" keyword makes coding event-driven OOP objects quite pleasant.
My only problems with VB are the non-short-circuiting Boolean operators (so you have to write AndAlso and OrElse for short-circuit instead of And and Or), the bizarre +1 array sizing (but you should be using lists instead of arrays anyways so it doesn't matter) and the anachronistic Dim keyword. Even the option-strict thing makes sense because there are some cases where static typing is excruciating if you're just hacking something out - "oh crap, I have to use this terrible .net 1.1 library that predates generics, either I have to write a zillion typecasts or I can just go with dynamic typing".
- midnitewarrior 13y agoYes, there are some backwards compatibility artifacts in the language. I like how verbose it is, little room for ambiguity when sharing code with lesser-experienced programmers. C# is efficient, but a bit cryptic for people not well-versed on c-style languages. Also, curly braces.
- Pxtl 13y agoI think curly braces are perfectly clear, to me the big problem with C-derived languages is the use of cryptic Boolean operators. The SQL-style "And", "Or" and "Not" Boolean operators are far more legible than "||", "&&" and the easy-to-miss "!".
- Locke1689 13y agoGiven that the VB.NET side of Roslyn is written in VB.NET, I can probably say I've hacked on the largest modern VB codebase in existence. As someone who has had never looked at any form of VB before this: meh. It's basically C# with a... unique syntax. There are a few things that VB does better though: type inference for lambda expressions and exception filters.