Hacker News new | past | comments | ask | show | jobs | submit login

And there's an even larger number who don't hate curly brackets, but are forced to deal with Begin/End's because the large company they work for is so inertia-bound to VB.



Yes, and I think these people should ask premium bonuses for this.


At my previous employer, I had to use VB.NET and you honestly forget about it after a couple of weeks, especially since both languages are mostly on par today ...


I have to switch between both at my job, and hardly ever notice when I do. Sometimes I'll start to write an If wrong and get squiggly red lines, but that's about it.


Visual Studio is busted for VB.NET - Snippets are unusable. There goes a quarter of your productivity.

It's death by a thousand cuts with VB.Net - You can have namespaces, but oh - VS won't put them in your code automatically like it does for C#. VB.NET also has a mismatch with the .NET framework compared to C# which has "static class" instead of "Module". When forced to use a Module in VB.NET, every function is hoisted into the global scope (and all you wanted to do was make some extension methods).


I use both languages, and like them both just fine. Your complaints are a matter of having a preference for the C# paradigm over the VB one.

Snippets: In what way are snippets unusable? Hold down the Ctrl, then type KX.

Namespaces: VB is sneaky. Right-mouse-click on the project (in the Solution Explorer), select Properties, go into the Application tab. The equivalent to the automatically inserted namespace is the "Root namespace" field.

C# static class vs VB Module: What is the mismatch, exactly? They essentially the same thing (see http://stackoverflow.com/questions/881570/classes-vs-modules...). Members of a Module can still be qualified with the Module name - it's just optional when there's no ambiguity. BTW, "Extension Methods" are available in VB since VS2008 (see http://msdn.microsoft.com/en-us/library/bb384936(v=vs.90).as...).

You're probably also not happy about the case-insensitivity, lack of implicit interface implementation, or the use of keywords over braces to make code blocks, among other things. Whatever, but I use both, and at the end of the day I don't find VB more verbose than C# overall, or C# less friendly.

Each have quirks that make them a mixed blessing. One can easily google on "c# vs vb syntax" and get plenty of articles on the strengths and challenges of each.


> Hold down the Ctrl, then type KX.

You forgot the last step - after you hit those keys you must still type or choose the snippet list. Compare to C# where the workflow is much more streamlined - I just type the name of the snippet and intellisense shows the list of snippets (as I'm typing). Huge difference.

> The equivalent to the automatically inserted namespace is the "Root namespace" field.

No, it's not. If I add a folder in C# (again, where the workflow is much more streamlined) - it automatically becomes a namespace. 99% of the time this is what I want. In VB.NET, when I add a class to a folder, it does not automatically use the folder name as the namespace. Instead, I have to open each file and add the namespace myself.

> Members of a Module can still be qualified with the Module name - it's just optional when there's no ambiguity. BTW, "Extension Methods" are available in VB since VS2008.

There is no concept of a "Module" in the .NET framework. That's a VB.NET thing and that's why I say that C# is more in line with the .NET framework. The framework has static classes, C# has static classes, VB.NET has...no static classes.

I know that VB.NET has extension methods, what I said was that you're forced to put them in a "Module", which means that every extension method now shows up globally. Meanwhile in C#, the more streamlined language, things work the way you'd expect: Extension methods only show up on the class-instances that you're extending.

> Each have quirks that make them a mixed blessing.

Right, but one has way more quirks. One of them adds a layer on top of the .NET framework that invents concepts that don't exist in .NET and one has more complexity and kruft than the other. That one is VB.NET.

One more example for the road: In C#, when I have my cursor on a method and I hit F12/Go to definition...I am taken to the actual definition of the code where I can see attributes on the method as well as the actual declaration. Do the same in VB.NET and it takes you to the Object Browser where you can't see any of that. So yeah - I'm sticking with my conclusion that Visual Studio is busted for VB.NET.


This might be in jest, but I've seen something close to this. I do a lot of work in C# and a number of years ago I had two different roles approach me to work in VB.NET and it was > 10% premium over the C# equivalent market rate - the megacorps struggled to get people to switch so threw money at anyone with a whiff of interest and talent.

(I said no in-case your wondering).


In BASIC there is no Begin.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: