VB.NET Sucks
No Really. I've had it with that language. And I wish to hell that MS wouldn't expect people to keep submitting sample code in both formats ;)
Mikeey's Brief story of code exposure:
I started coding when I first saw Access - and new it would be the DREAM BOAT 'spreadsheet' to keep track of my collectible miniatures. During my 'Access' stint, I got fairly decent at using VBA. I even took a class on VB in college: Computing and the Humanities. (yeah, I know... stop laughing...)
Then I got a real job as a developer (during the bubble days - I had a pulse and actually KNEW SQL). Only my job was using PHP - which was fine by me because from a bit of the web stuff I'd done prior to that, JavaScript was cool. I even took a VERY slight detour into C++ land... but came out mostly unscathed....
Then I went back to Classic ASP - using the heck out of VBS. To the point where I knew VBS in very SICK detail.
Then .NET came around. I was gullible. I believed all the schmaltz about VB.NET being a real language. I bought books about how to use it like a REAL developer. I sooo wanted to be a real developer.
Then Carson convinced me to TRY C#. I cursed. I swore. I banged on a lot of crap. I threw books. For about 2 days.
2 months later, I couldn't stand going back to VB.NET. Years later (i.e. today), and I abhor the time I spend with VB.NET.
Then I read this: Why VB.NET sucks - and felt VINDICATED.
That, and I just can't LIVE without being able to do things like:
string oink = myHashTable[someKey] as string;
if(oink != null)
Or
lock(this) {
// yada yada yada
}
(And don't even get me started on how dumb the syntax for Generics in VB.NET 'feels' ... )
I TRY not to hate it - or tried. But now I'm done with the notion of trying not to hate it. You can like it. That's fine by me. But don't expect me to like it...




You can't do that:
string oink = myHashTable[someKey] as string
In .Net 2, you need to check for the existance of a key first.
Posted by: Ayende Rahien | November 02, 2005 at 09:52 PM
Ayende,
Do you mean there's a perf hit or something? Or that I can't do that in VB.NET as well?
(cuz doing strink oink = myHashTable[keyThatDoesn'tExist] as string; totally works - oink just ends up being null).
Posted by: Michael K. Campbell | November 02, 2005 at 10:59 PM
Mike, to a large extent, I feel this could've been written by me. I was frustrated and mumbled a few times when I switched to C# but after about 2 days, it was like the skies opened up. My productivity went up. Less compile time errors and less runtime errors. It's refreshing.
I don't care what time of IDE enhancements come with VB.NET, I don't want to go back. VB.NET code can about 100% time be as good as C# (it's all IL, right? Except for the edge case you reference in your post). But, I *cringe* when I see people (and I did this a little, too) migrate VBScript to VB.NET using a wizard (sometimes it works, but often could be a lot cleaner), not using Option Strict, etc...
But ... don't use lock(this) {} :)
-Brian
Posted by: Brian | November 03, 2005 at 11:08 AM
I mean that you'll get an exception if the key doesn't exist.
(That is, if you use Dictionary, of course.)
Posted by: Ayende Rahien | November 03, 2005 at 12:28 PM
Please see the following posts regarding my rebuttal to your statements:
Shooting down more Anti-VB'isms...
http://addressof.com/blog/archive/2005/12/07/9299.aspx
(Rebuttal) Reason #458 Why Visual Basic .NET Sucks
http://addressof.com/blog/archive/2005/12/07/9298.aspx
Posted by: Cory Smith | December 07, 2005 at 12:09 AM
Nice.
Thanks for the clarifications Cory. I appreciate the tip on how to handle the 'as' keyword in C#.
To be honest, a good deal of my frustation with VB.NET comes from
1) Not using it very much
2) only really using it when i have to convert a demo/article/etc into VB.NET from existing C# code (so I'm constantly butting up against little 'issues' (like no 'break' statement in loops, etc) which just frustrate the heck out of me.
That said, I still simply just prefer C# - but having all of the facts is cool - so thanks for the clarifications.
Posted by: Michael K. Campbell | December 07, 2005 at 09:43 AM
So, you basically admit to writing a rant post based on very limited knowledge, since you "don't use it very much"?
Uh....
Posted by: J | December 07, 2005 at 11:40 AM
Yeah Mike, I'm with the courageous "J" here.
How dare you post a rant in frustration on something you don't use very much. That's sooooo taboo on blogs. No one ever does that.
And to add insult to injury, how dare you back down when someone posts a well reasoned rebuttal.
Uh.....
Posted by: Carson McComas | December 07, 2005 at 12:14 PM
J,
Thanks. I appreciate your disdain. That and your cunning discernment of my lack of knowledge.
*Everyone stop your jobs and look at the baaad man!!! Everyone look at the man who doesn't use VB.NET very much, and therefore has very limited knowledge!!!*
Only I don't remember saying I had very limited knowledge of VB.NET - just that I don't use VB.NET very much.
If you look at what I posted, it's a rant, not a doctoral thesis. It's just my observation and opinion on a few things I have problems with, my general 'feel' for the language and a link to a post claiming a MAJOR implementation problem - which sure looked factual, and like a major problem.
Other visitors have been able to point out solutions, corrections, and provide insightful feedback all without acting like an ass. You'll also probably notice that I didn't flame them, or tell them they were idiots for using VB.NET. See, I'd rather learn from them than call them dummies just so I can feel good about my decision to use C#. I use C# not because I'm better than VB.NET users, but because I like it.
That, and I'm not afraid to sign my name to things.
Uh... Coward, Uh...
Posted by: Michael K. Campbell | December 07, 2005 at 12:22 PM
True, VB .NET sucks - for people who have no clue on programming.
Posted by: Holly | December 11, 2005 at 03:54 AM
http://www.brokencredit.com
Posted by: PJP99 | March 19, 2006 at 12:43 PM