27 ms·
I also want to commend Microsoft for continuing to support VB and not succumbing to the whims of sneering hipster programmers who consider it beneath contempt (
by Analemma_ 10y ago
I also want to commend Microsoft for continuing to support VB and not succumbing to the whims of sneering hipster programmers who consider it beneath contempt (see the second comment on that article for a good example, with a classy response from MS). VB is a thing that a lot of people rely on, and some even like, and doesn't deserve to be kicked to the curb.
- throwawaydbfif 10y agoI'm all for maintaining backwards compatibility but I've coded in both and VB is just an inferior language. Sorry :)
- Pica_soO 10y agoIts not for backwards compatibility, is for beginner friendliness of a eco-system. If one had a stroke and lost all knowledge on comp-science- what would you be more likely to drop for overwhelming complexity and missing instant results? C# or VB?
- maxxxxx 10y agoI think VB6 and VB.NET are totally different beasts. VB6 is maybe a good language for beginners but VB.NET is just a weird language in my view. C# is a much more natural fit for the .NET runtime.
- wvenable 10y agoFor a language that has both "And" and "AndAlso" as keywords; I don't think VB.NET should be considered the paragon of beginners languages. It might have "Basic" in it's name but the complexity of smashing old-school VB syntax and semantics with .NET syntax and semantics has not made for a very beginner friendly language. It's more complex than C# (excluding some of the newest C# features). It's just painted over with a more English syntax to appear beginner friendly.
- cm2187 10y agoHow is it far more complex than C#? Both have been designed at about the same time and VB.net has broken backward compatibility precisely to get rid of legacy design decisions. But both have evolved since. And yes you can use a generic and non generic version of a class. Yes you have old style async and new async/await versions of methods. Yes you have explicit typing vs type inference with two ways to do the same thing. And yes you can use lync as an expression or as chained functions. How is that different from C#? Both have evolved pretty much side by side and have as much legacy. The one thing in my opinion that has been preserved from VB6 and is dangerous as ambiguous semantically is the following: Dim x as Integer Means declare a variable x and instantiate it to zero For i = 1 to 10 Dim x as integer x += 1 Next The second line means declare x as integer but only instantiate it to zero the first iteration, the second iteration the instruction will be ignored. That to me is unintuitive.
- wvenable 10y ago> How is it far more complex than C#? Basically you answered your own question. VB.NET has all the same features as C#, evolved over the same time, but VB.NET has a bunch of additional "crap" held over from a language and environment that it isn't compatible with anymore. That's how it's more complex. You didn't even consider in your example that you declare variables with the keyword "Dim". Do you even know why? It's meaning has almost been lost to history and makes little sense for what it's used for now.
- cm2187 10y agoHow is "Dim" worse than "var"??? In fact even before type inference I always thought that Dim was a better idea. It was kind of absurd to be forced to write your type twice. Dim D as New Dictionary(Of String, String) vs Dictionary<string, string> D = new Dictionary<string, string>();
- wvenable 10y ago> How is "Dim" worse than "var"??? Var means variable. In VB6/VBA, the Dim New syntax actually had different semantics; it would create the instance on first access instead of when the Dim statement was executed. It also had the fun side-effect that setting the variable to Nothing would destroy the instance but anytime you accessed that variable it would just create a new one. Irrelevant now, I guess, but still a nice bit of trivia.
- sokoloff 10y agoI laughed as I read your comment (not the way you intended). "Try VB.Net, the perfect language choice for stroke victims."
- deleted 10y ago[deleted]
- arwhatever 10y agoI must admit that many VB.NET keywords more closely represent their respective concepts than C# does, but having far more C# experience, those VB.NET keywords initially strike me as seeming like baby-talk.
- goda90 10y agoThe sneering may be driven by those who are stuck in VB6. My company is still in the middle of replacing a huge VB6 code base with a C# web based system, and doing anything in VB6 with the VB6 IDE is a nightmare in comparison.
- WorldMaker 10y agoI've been doing VB6 conversion stuff for most of my career, so I definitely feel this. I think the sneering is more driven by the sorts of people that think that programming shouldn't be easy/accessible to the untrained masses. There seems to be a lot of coding elitism/machismo/masochism out there.
- marcosdumay 10y agoDo you think VB.Net is in any way more accessible than C#? Or that any of those is less accessible than VB6? The untrained masses have a way into getting hooked on tools that are harder but offer no benefit compared to many other stuff available around. It is very easy to hate those tools.
- sokoloff 10y agoWe ported a massive classic ASP site to VB.Net in 2003 and then several years later ported it to C#. My experience was that some devs did better with VB.Net (coming from classic ASP) than they would have jumping to C#. It wasn't quite "open the site in the new IDE and fix all the squiggly underlined bits" but that was a substantial part of the mechanical effort. Starting from nothing? Skip VB.Net and start with C# (assuming you're set on the CLR). Starting from VB6 and a novice programmer? VB.Net has advantages over C#, IMO.
- WorldMaker 10y ago«Do you think VB.Net is in any way more accessible than C#?» Having been a teacher's assistant on courses the answer is very clearly and emphatically: Yes. It's easy to discount the accessibility of a syntax when you are already at the top of the learning curve, but the Algol family will always be tougher to teach/learn than the BASIC family. Punctuation is harder than you think. (Aside: partly why I think JavaScript is actually the easiest to teach in the Algol-inspired family for the benefit of having optional semicolons alone.) «Or that any of those is less accessible than VB6?» That's not an anecdote I have first hand experience with. I think there are a lot of cranky VB6 developers that sneer that VB.NET is worse and so much harder than VB6, but my gut tells me that that may be more the relative learning curve/gap in moving from VB6 to VB14. I don't think it is anywhere near as representative of the accessibility of learning VB14 as a first language. (I also think the more important question is the accessibility of moving from Office VBA to VB14, as it still seems for a lot of disciplines Office VBA is the most important first step towards programming.) «The untrained masses have a way into getting hooked on tools that are harder but offer no benefit compared to many other stuff available around.» I'm not sure what you are getting at here. I don't think VB.NET is any "harder" than C# and while VB.NET might not offer "more benefit" than C# (assuming you discount syntax/accessibility entirely as a benefit), it certainly is no worse than C# as a tool for a person to use.
- WorldMaker 10y agoGiven (MOS 6502) Microsoft BASIC was the company's first product, BASIC has been such a deep part of the Microsoft DNA, I couldn't imagine Microsoft discontinuing VB. I'm not sure a BASIC-less Microsoft would still be Microsoft. It almost seems easier for me to imagine a Microsoft without Windows than one without VB or some successor to VB.
- seanmcdirmid 10y agoNot just that, it was BillG who wrote the code for that. Not going deeper in MSDNA than that.
- zip1234 10y agoEven without Visual Basic .Net, MS would still have Visual Basic in MS Office and that will be around probably until the end of time
- mpeg 10y agoI wrote my first non-toy lines of code in VB6, with a (pirate) copy of the IDE that I had to ask for as a request to a dude that sold cds in a public park. At that time, I only had a C/C++ compiler that I didn't know how to use (because I had no internet and no standard library / STL docs). The MSDN library that was preloaded in the cd was an eye opener, and the visual components made it easy to experiment. I would probably work in a restaurant today, if it wasn't for that cd.
- kittenmittens 10y agoI have to still maintain some things running on VB6 code. It has it's whims, but there are worse things to work with as well.
- bkmartin 10y agoI also have a small pile of vb6 code that I must support. And while it usually behaves OK there are some instances where putting it on a Windows 7 machine to run will cause some headaches. I got my first serious code written in VB6. It is the first IDE that I bought with my own hard earned money as a kid and it was great. I still dream of a day when there is a language/framework that makes development that easy again.
- dotancohen 10y agoYou might want to look at PyCharm (Has free community edition, $99 year for pro) and Python. My eight year old writes Python!
- bkmartin 10y agoI loved Python when I learned it back in college. That was around Python 2.3/2.4. I said back then (while doing mostly C++) that Python should be the base language for CS101 at the University level. It was much easier to work with as opposed to the nuances of C++ compilers at the time. My biggest dream is the ability to have a cross platform Mobile App/Web App ecosystem. Something that you can use from any device with a virtually equal experience. Not so easy at the moment, especially for things that need to be charged for... app store fees are way to big in my opinion. /rant
- Clubber 10y agoIt's not just hipsters ;) All joking aside, VB.NET has solved a lot of problems for companies.
- MadsTorgersen 10y agoBTW, as trolls go, the one who commented on the blog turned out to be comparatively sweet: After my response they came back to say they were really sorry, and asked that I delete their comment. Which I did, so you won't see it anymore. #TrollsArePeopleToo :-)
- Analemma_ 10y agoWhoa, hi Mads! I hope we see you more around here, there's usually an HN post corresponding to big C#/.NET announcements and it would be great to have your input.
- MadsTorgersen 10y agoHey, thanks! If they let me out of my cave again, I'll make a point of visiting more often!
- jackmott 10y agoI think they should quit with VB support not because there is anything wrong with it, but because it is, now, identical to C#. It is just C# with words replaced. This is nonsense. I would donate many beers if they halted all VB work and put those guys and gals on F#!
- btilly 10y agoAs long as paying customers have legacy VB code, Microsoft has a very good reason to continue supporting VB. Companies generally spend a lot more money maintaining legacy code than they do creating new code.
- runjake 10y agoLegacy VB != VB.net. VB.net is just C# with the words replaced (although there are a few unique logic structures). Legacy VB code has to be ported to VB.net.
- btilly 10y agoYou should parse my statement as (legacy (VB code)) and not ((legacy VB) code). At this point anything written in VB of any flavor is legacy. But it still needs to be supported. And as long as that is true, Microsoft has reason to support it.
- Zardoz84 10y agoOr throw it to the trash and rewrite it
- krylon 10y agoIn an ideal world, this would probably happen quite often, but on a large and complex code base, it also means throwing away the specific knowledge that might only exist in the heads of people who have already left the company, as well as throwing away the countless hours of debugging to get it working (even if "working" might mean "barely working"). From a management point of view, it means throwing away a large amount of money and then spending more money to replace the old code base, accompanied by the usual risk of whooshing deadlines and all that. To a programmer it might be easy to see that a rewrite will save the company money in the long run, that can be difficult to sell.
- cm2187 10y agoSeconded. Though I don't really understand what is their message on VB in plain english. They will continue supporting it but won't be adding new features like they do in C#? Am I right to read it this way?
- ctolkien 10y agoI read it as "we will be adding features that make sense for VB (which might also make sense for C#), rather than keeping it in sync with C#". Allowing it to evolve on it's own, rather than being C#'s ugly little brother.
- fjert 10y agoI had a boss who started one of his companies in his attic and while he wasn't a 'real' software developer, he was still able to bring his initial ideas to fruition to get a working product because of how approachable VB is, especially for those without much experience programming. It definitely has its purpose and I am glad Microsoft understands that. The hate over VB and BASIC languages in general seems like a matter of elitism among software developers to me and oddly enough, I see this attitude from inexperienced developers more often than experienced ones.
- softawre 10y agoIt's not that odd to me that inexperienced developers just don't "get it" yet about stuff like this. Maybe because I used to be (more) inexperienced and have opinions like this.
- kodfodrasz 10y agoI have written small kid's experimentations in QBasic, and it was fun at the age of 13, but then when I had to use VBA at the age of 28 after considerable amount of experience in C# (among others), it was painful. Is this because of elitism? No, it is because VBA has some terrible properties, which are not true for VB.Net. VB.Net is mostly OK, I just don't use it. I'm also glad they keep that product alive, because in addition to the many positive aspects meantioned in the comments it makes sure that the CLR evolution takes into consideration the aspects needed for a more broad variety of languages.
- pizza234 10y agoThe hate on VB(6) is specific, and it's caused by the language making the "programmer" slip into bad practices, like mixing the application and presentation layers, or the infamous "On Error Resume Next". Design-wise, this is well justified hate - I stress "design-wise". In the bigger picture, the ease of the framework attracted plenty of unqualified masses, therefore there is surely lots of people with a painful past of VB6 applications maintenance. Of course I don't want to detract from VB6, as at the same time, it made very simple (or as simple as possible) for almost anybody to create applications - I'm not aware of any other language/framework which accomplished this.
- flukus 10y agoIt's not VB as a language, it's VB as an ecosystem, including the developers. It's the same with php and javascript. When you have a class of developers happy to just slap things together and unable to learn other languages frameworks you end up with a lot of awful code. If I were to take a VB.net job it's not the language I'm worried about, it's the mess of spaghetti code I know I'll have to deal with.
- ocdtrekkie 10y agoThe thing is... VB, PHP, and JS have all enabled an incredible amount of creations that never would've happened without them. It's honestly hard to imagine where we'd be without these ecosystems, and the casual slapping things together that these enable.
- flukus 10y agoTrue, but I've also seen millions of dollars flushed down the toilet on failed projects. The culture around these languages have been the primary reason for many of these failures. I've seen millions more wasted on workarounds and attempts to fix the spaghetti code they contain. So while the world has some cool stuff that it might not otherwise I'm not sure the world is better off for it.
- mattmanser 10y agoI've had to pick up a couple of VB.Net projects. They've both been poorly written, badly implemented and years if not decades behind the time. There's a reason for the sneering. One of those I've virtually completely rewritten in C# and the code base is now like 30% of the TLOC. Not because of the language, but because of the type of programmer who started a new project in VB.Net in the last 5 years. For all intents and purposes the languages are virtually interchangeable, though C# is generally more succinct and somehow "better" to me. I don't even really think about it when switching between the two. UK projects, for reference, where .Net has always penetrated further than Java. I also still get an inordinate amount of calls because my linked in profile list VB.net asking to 'upgrade' a project from VB.Net to C#. Then again, the salesforce offers I get too... Ugh, much worse than VB.Net.
- scarface74 10y agoIt's not about sneering a VB. I don't see the use of it in 2017. I started using VB6 in 1999 - 2000. I was a pretty good C and C++ programmer, I could do a little MFC, I was pretty good at writing COM and DCOM dlls in C++, etc. but I saw a real advantage of VB to getting used friendly GUI apps done and the IDE was pretty good. I would often wrap c++ code in ATL wrappers to create COM objects to use in VB. But what's the real purpose of VB today? No matter how you look at it, either C# is just as easy as VB.net or VB.Net is just as complicated as C#. It seems just wordier and redundant.
- smoothdeveloper 10y agoNowadays, do you use any language which is not C like? Regarding VB, the language is used by many people whose main occupation is not software development, and even for those doing software there are many who find C# or similar looking languages aren't a panacea (I do, and have around 15 years of C# experience). In some cases VB is also less redundant than C#, it has better type inference for example. I'm sure plenty of pascal/delphi developers are also fine without C#. You should understand that other languages than C/C++/C# make different syntax choices, and it is not hurting C# in anyways that such language exist and prosper. Note that I had a lot of prejudice against VB but I came back from that perspective, and in the meantime, I feel additions to C# language push it in territory where the syntax is getting really noisy / clumsy (I've picked up F# so I use that it as a metric).
- averagewall 10y agoI'm just waiting for a robust VB to C# converter or at least a way to start moving code across gradually. For now, I'm locked into VB because of a huge code base that's all one giant assembly. It'd be great if you could put C# classes in a VB program (not as dlls), then we might see some VB programmers just stop using it for new features.
- thearn4 10y agoI'm translating a giant pile of Excel w/VB macros into Python at the moment and am not exactly having fun. The ugliness isn't really VB syntax as much as the interactions with and organization into the underlying sheet. But I can't argue with the fact that it did do it's job for a long time. And I've learned to not underestimate the value of something that is known to work.