home links tools blog about

« Sony's RootKit Getting Bad Press - As it should | Main | ASP.NET Cached Singleton »

November 02, 2005


Ayende Rahien

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.

Michael K. Campbell


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).


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) {} :)


Ayende Rahien

I mean that you'll get an exception if the key doesn't exist.
(That is, if you use Dictionary, of course.)

Cory Smith

Please see the following posts regarding my rebuttal to your statements:

Shooting down more Anti-VB'isms...

(Rebuttal) Reason #458 Why Visual Basic .NET Sucks

Michael K. Campbell


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.


So, you basically admit to writing a rant post based on very limited knowledge, since you "don't use it very much"?


Carson McComas

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.


Michael K. Campbell


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...


True, VB .NET sucks - for people who have no clue on programming.


Point 1. Holly's an idiot.

Point 2. Your "real" programming language doesn't even compile down to the registers anymore. Your "real" programming language is just a big Virtual Machine. That's why it loads & runs slower then sh*t you wrote 10 years ago in vs6.

Point 3. .NET is supposed to be the answer to dll hell. By introducing Framework hell?

Point 4. Your creativity has been limited tremendously. Once upon a time you had the what and the how. The how was so important. It was fun to figure out how. How to make it work. How to make it faster, smaller, etc ...

Now, ALL of your hows are taken care of for you. No more reason to think for yourselves, little drones. Just call one of our nice little pre-chewed functions and drink your broth.

Your code is managed, therefore YOU are managed.

The whole .NET circus is trash. I say it with absolute confidence.

vb hater

man, i am totally with you. i am at work now trying to convert a C# class to VB.NET and i am reminded of how much vb's unnecessarily verbose syntax absolutely sucks. i started out with VBA just like you (excel, access, some word). i later moved to VB.NET and HATED searching the internet for how to do something, only to find that every example was in C#. i cursed C# daily until i was required to learn it for this new job last year. it wasn't a few weeks until i started cursing at VB. I HATE F***ING VB. F***CLONG HATE IT


About the "break" keyword: wouldn't Exit For, Exit Loop, etc. do the same?


Yes, and Exit XXXX statements are a lot better than break # statements because of clarity.

I take it that the author of this article just dislikes VB. That's fine. But it doesn't "suck". It has a completely different syntax that some (like me) enjoy, others (like the author and "vb hater") dislike.


Ich Buch markiert einen Blog blog.angrypets.com auf Digg und Stumble Upon. Ich lese Ihre Kommentare.

The comments to this entry are closed.