

Why Visual Basic is (supposedly) better than C# - senic
https://www.simple-talk.com/dotnet/.net-framework/10-reasons-why-visual-basic-is-better-than-c/

======
rohansingh
Sigh. I'll actually do the job of debunking these one by one.

1\. Almost every mainstream language has case-sensitivity. This avoids
ambiguity by having only _one_ right way to express a given variable. Since
Visual Studio has excellent autocomplete, you don't have to repeatedly use
SHIFT, and you are unlikely to accidentally mistype the variable name.

Of course, when I see an argument like, "When you accidentally leave Caps lock
on, it really matters," I have trouble taking the author seriously.

2\. The reason switch is different from if-else is something you can learn
from any language primer. The author makes the following argument: "It’s easy
to forget to type in each of these Break statements!"

In fact, it's not easy. The "break" is required by C# in any non-fallthrough
cases. Not typing it will generate a compiler error. Not something you can
miss.

3\. Here the author makes a red herring of an argument regarding how you can
use Visual Studio to setup event delegates for UI components. Apparently some
paradigms are supported for VB.NET, and others for C#. Of course, what your
IDE supports has nothing to do with which language is "better".

The basic argument is that you need to return to the design view to create an
event delegate rather than being able to do it from code view. Of course, most
experience C# writers will stay in code view and just type the following
themselves:

    
    
        _myButton.OnClick += ... (tab to autocomplete new delegate and handler)
    

4\. The author then continues to say that the comparison symbols in C# are
"stupid" compared to Basic's "And", "Or", etc. This argument almost doesn't
deserve to be addressed, but I'd like to point out that C# has the advantage
of not overloading the assignment operator (=) with equality comparison (==).
Keeping these separate prevents a common class of error.

5\. The author fails to trigger autocompletion for creating a new property in
C#. This is largely because he doesn't know that the way you do this in Visual
Studio for C# is to type "prop <property name>" and hit TAB. The behavior is
then exactly the same.

Regardless, still a comparison of IDE features rather than languages.

6\. The author complains that the "PMT" function, which "calculates the annual
mortgage payment for a loan", is not a builtin in C#. I am not rightly able to
apprehend the kind of confusion of ideas that would provoke such a statement.

7\. The author argues against needing semicolons in C# for line endings.
Alright, at least this is actually about the language itself. Personally I'm
not a huge fan of needing semicolons either. A style thing, but I'll let it
stand.

8\. The author complains that the type for a variable declaration precedes the
variable name in C#. Somehow this is a major problem. Obviously just scraping
the bottom of the barrel here.

9\. The author complains that C# does not automatically cast enums to ints or
other types. I'll leave it to other sources that talk about the pros and cons
of implicit casting a la Scala.

10\. The author complains that is not possibly to reinitialize arrays to a new
length in C#. He admits that he has been told that, "I should be using lists
and not arrays anyway." But he retorts that, "The point is that - as so often
- Visual Basic makes something easier to code than C# does."

I fail to see why using a List<string> is somehow harder than string[].

In conclusion, I really have to hope that this is a joke.

~~~
masklinn
> The author then continues to say that the comparison symbols in C# are
> "stupid" compared to Basic's "And", "Or", etc. This argument almost doesn't
> deserve to be addressed

It does. I'm pretty sure VB's "And" and "Or" don't short-circuit…

> 8\. The author complains that the type for a variable declaration precedes
> the variable name in C#. Somehow this is a major problem. Obviously just
> scraping the bottom of the barrel here.

The author also complains that out-parameters have to be annotated as out-
parameters in C#, apparently does not realize parameters don't have to be out-
parameters.

> But he retorts that, "The point is that - as so often - Visual Basic makes
> something easier to code than C# does."

Basically, he complains that C# makes it harder to do the wrong thing than
Visual Basic. Which tells you a lot about the mindset.

~~~
rohansingh
> It does. I'm pretty sure VB's "And" and "Or" don't short-circuit…

Interesting, didn't know that. However, I got the feeling that he wasn't
talking about how the operators work so much as what they are named.

------
jeremysmyth
For those who aren't sure if it's satire or not (90% of other comments as I
write this), I'll give you a clue:

 _Andy ‘Wise Owl’ Brown decided to write a tongue-in-cheek rant whilst he
could still remember the pain-points_

(it's in the _very first sentence_ )

~~~
emn13
It's not very good satire. Some of the points are potentially real; it's not
clear why they wouldn't matter. When you label something "No offense
intendend" and proceed to make offensive statements, your preface isn't
helping. Prefacing something with small-font "this is toungue-in-cheek" and
proceeding to mix potentially real issues with non-issues a novice isn't
helpful. I don't see how spouting irrelevant nonsense is satirical in any
case. Maybe it's funny? AndAlso vs. &&; haha? If so, I don't get it. Instead
it comes across as someone who really was annoyed, knew it wasn't for rational
reasons, and thought head off criticisms this way.

Whatever. Why is this on HN?

~~~
coldtea
> _It's not very good satire._

If it confused people then it IS very good satire.

> _Some of the points are potentially real; it's not clear why they wouldn't
> matter._

That's the very essence of satire. It has to be somewhat connected to reality.

What you seem to ask for is "grotesque statements" or "surreal humor".

~~~
emn13
I expect satire to have a point. This doesn't. Is he trying to make fun of all
those people hating these C# features? Never heard of anyone who _seriously_
complained about these. Is he making fun of VB misfeatures? Doesn't seem to
make sense either.

It doesn't make sense as satire. It does as shallow griping.

------
tragomaskhalos
Behind the satire lurks a serious point though - a lot of C# programmers need
to get over their snotty attitude to VB.NET, because once you get past the
whole VB stigma thing they're basically isomorphic.

One point the guy didn't make was that VB.NET has XML literals, which are very
nice if you like that sort of thing.

~~~
danielbarla
I find that most C# developers don't have strong feelings about VB.Net; if
they comment on it negatively, they are probably trying to avoid the old
stigma by association.

Although VB.Net's syntax is not really my cup of tea (it's a bit too wordy for
me), I find that many of the keywords make a lot more sense than the
equivalent C# ones. E.g. explaining the meaning of "shared" is a lot easier
than explaining "static", because the concepts it brings to mind are closer to
what's actually happening.

------
UnoriginalGuy
The reason I /like/ semi-colons is that I can automate code formatting to my
pleasure. If I open someone else's code file and they are doing strange things
(e.g. spaces instead of tabs, { on the same line, etc) then I can have the IDE
re-format everything in a split second to my preferences, and they can do
exactly the same.

Or if the project manager is requiring all code to be formatting a certain way
then I can re-format the code before I submit it. Plus with a language you can
so quickly and painlessly re-format, why even require code style standards
that dictate whitespace?

While some of this MIGHT be possible with VB.net, it is a lot trickier since
whitespace is "content" in that language.

------
redact207
Sadly this is how many VB guys think. I'm a C# guy and I honestly don't care,
it all compiles to the same MSIL anyway and intellisense makes it easy to
write either. Seriously if my keyboard was ever logged, all it'd reveal is
txtI<tab> if(is<tab>) { refre<tab>;

One reason VB has such a stigma attached to it is because it's common to see
it written by non-developers, particularly lurking in excel as some background
macro. Anyone can butcher any language - it's just a matter of preference.
Anyone who touts a language so strongly has clearly lost the purpose of having
it and is not worth debating with.

~~~
pjmlp
I know of a company where the manager requires VB code, because he wants to be
able to read it from time to time!

------
anton_gogolev
Oh what a piece of BS. Yet another shallow, mechanical comparison of tiny
"features" and IDE peculiarities with no other purpose in life other than
initiating a decade-old flamewar.

And comparing "&&" and "and"? Really?

~~~
bertzzie
wait, the article is not sarcasm? I thought the site is some kind of the Onion
for programmers?

~~~
coldtea
The main sarcasm is people missing the point, while it's there, in the first
BLOODY line of the article.

~~~
astrodust
It's in a box which has the effect of making it invisible.

------
wilhil
I used VB for many years and didn't understand why the C# people mocked it...
then, about 3-4 years ago I switched and have not looked back.

In my honest opinion, whilst VB is obviously fully supported, C# just "feels"
more professional... When you get your head around the syntax, you can
seamlessly move between C#/Javascript and many other languages that all follow
similar syntax without even thinking.

In addition, there are so many more articles/examples/open source projects and
just help out there for it.

~~~
laumars
Learning C# to make switching to Javascript easy seems somewhat backwards.

Plus it's not as if it's hard to leap between C-syntax and VB's syntax anyway.
They're both imperative languages with much of the same core blocks (albeit
often called differently). Switching between such languages shouldn't take
more than a quick glance through a "beginners guide" and then some cross-
referencing as you go alone (like using an English/French dictionary). It's
not like they're different paradigms like functional languages (Lisp et al)

~~~
wilhil
I didn't learn C# to make Javascript easier - I switched to C# due to the
majority of work in my specialty requiring it more and the fact it paid a lot
more.

The side effect.... I always found that programming VB was easy but switching
to Javascript AND other languages took a few minutes to get my head around (or
I would mix some syntax up)...

Now I find that I can flawlessly switch between Javascript, C# and a few other
languages without losing speed at all, and generally, I find that I am a much
better programmer for switching.

------
mzf
I use both VB.NET and C# and I'm actually bothered by the missing case-
sensitivity of VB.NET because it makes hard to impose naming conventions. For
example if I have a class named as MyClass then it would make sense to name an
instance of it as myClass. Unfortunately it confuses intellisense and it
suggest me later always the class not the instance. Thereby I'm forced to name
my instance as MyClass1 or something else that doesn't feel so natural.

------
felipebueno
Not sure if the article is a joke or sarcasm or something but the author makes
some good points. I use VB.NET in my daily job and Python for my side
projects. I like both (but Python is definitely my favorite language) and I
like it because it is really simple to read and to write. I know some C like
languages too and use it a lot (Javascript) but that curly-braces and semi-
columns thing feels just annoying to me.

------
a_a_a
From the author's blog

<http://www.wiseowl.co.uk/blog/s243/vb-c-sharp.htm>

WHY VB TRUMPS C#, AND HOW TROLLS DON'T AGREE! I recently wrote a blog on why
(I believe) VB is a better programming language than C# - I wasn't prepared
for the flames this would unleash. ...

------
afshinmeh
You said `&&` is a stupid symbol and `and` is a better one, right? Sorry I
think you're wrong because it's a symbol that used in almost all programming
languages include c, c++, JavaScript and...

~~~
pjmlp
C and C++ also have 'and' :)

Check iso646.h

~~~
afshinmeh
And `PHP` has it, also! But I didn't see any big application/repository that
uses `and` instead of `&&`, honestly.

~~~
pjmlp
Since I prefer the Pascal family of languages I do actually like "and", but I
will use whatever is the default in a given language.

This VB piece seems like a bit of VB programmer crap I usually hear from VB
users that only dabble in programming without any proper developer education.

~~~
afshinmeh
BTW, I think using `and` just make things more human readable, closer to what
Martin Fowler says about "Good programmers".

------
billpg
I once left the caps lock on, but I dodn't notice for a few minutes because
the editor kept correcting my typing to the right case. It was only when I
came to a string literal that I noticed.

------
tehwalrus
Keywords..... keywords everywhere....

------
Nordvind
Don't the point of such "Why eating feces is good" articles. I thought there
are some converters from vb.net to C#, if there are none - then rewrite those
damn tutorials, you'll end up saving much more health than if you do manual
convertion.

Let's just _bury_ that whole idea of 'programming for non-programmers' along
with ugly shit that arose from it (cobol, vb, etc).

