Logo




Subscribe:
RSS 2.0 | Atom 1.0
Categories:

Sign In


[Giagnocavo]Michael::Write()

 Wednesday, August 22, 2007
Reason #52 against Visual Basic (Nothing in Visual Basic)

What people do in their own time in the privacy of their homes is none of my business. However, when they mess with reading documentation, then it crosses the line and becomes annoying. How many times do VB developers need to be told that a null is "Nothing"? Consider this snippet from MSDN:

-------
The CreateUser method will return a null reference (Nothing in Visual Basic) if password is an empty string or a null reference (Nothing in Visual Basic), username is an empty string or a null reference (Nothing in Visual Basic) or contains a comma (,), passwordQuestion is not a null reference (Nothing in Visual Basic) and contains an empty string, or passwordAnswer is not a null reference (Nothing in Visual Basic) and contains an empty string.
-------

Five times in one paragraph! I know null type systems are annoying and lead to errors, but that seems a bit excessive. Seriously though, it'd make more sense to make VB developers learn a few words once, rather than having to mess up documentation just in case they get confused.

Code | Humour
Wednesday, August 22, 2007 2:49:34 PM UTC  #    Comments [5]  |  Trackback

Wednesday, August 22, 2007 7:12:24 PM UTC
I'm pretty sure that they just replace <see langword="null" /> with "null reference (Nothing in Visual Basic)".

- Brian
Wednesday, August 22, 2007 7:14:04 PM UTC
Most definately they do it automatically (no human would write such silly looking stuff). The fact that they'd have such a big expansion for a common word is just staggering though.
Monday, September 03, 2007 5:58:23 PM UTC
Reason #53

Check this:

Dim i As Int16
Dim s As String()

For i = 0 To s.Length - 1

Next

Error in the "for" line
Option Strict On disallows implicit conversions from 'Integer' to 'Short'

WTF????
Monday, September 03, 2007 7:36:55 PM UTC
ufff, Sorry Mike, you were right (by mail)

I wrote the wrong example.... I meant this:

Dim i As Int16
i += 1

the same message as in my previous comment.

so, the operator + doesn't work with int16s? that sucks...
Saturday, April 26, 2008 7:48:35 AM UTC
Patrick MacKAY, your 1 isn't an Int16 !!!
Of course the + operator works with Int16.
If you don't even know the language, what gives you the right to bash it?
VB programmers don't use Int16, they use Shorts.
You code should read:
i += 1S

About the language preference:
I can easily give you tens of advantages of VB.NET over C#... Optional parameters to just name one that is frequently used and VERY handy.
dotnetjunkie
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview