VB.net or C#

  • Thread starter Thread starter Alexandre
  • Start date Start date
Alexandre said:
I found this interesting let me know what you all think

http://www.sys-con.com/story/?storyid=49040

Hi Alexandre.

I think that was a pretty weak article. He makes it all about personal
opinion.
According to research in the field of cognition and information theory, he
is simply wrong.

Claiming that VB and Pascal syntax is just a matter of style when compared
to languages like C# and Java is not true when you consider how our brains
work. it goes something like this:

We humans works that we are bobarded with information all the time and we
filter and recognize stuff in our presence in a identification process based
on type, identity and value.In that order. This make us act. Most of this
processing is done unconciously and we seldom think about the process
itself. A couple of simple examples:

1. I see something moving across the street. It is a bird. I can't tell that
bird from any other bird. The bird is of no value to me. Ignore it.

2. I see something enourmous in the street. It is a bus. It is labeled 42.
That's the bus I need to ride if I want to make it to my meeting in time.
RUN!

3. I see something in my bed. It is a girl. It is my girlfriend. I love her.
*snuggle*

So what does this got do do with programming languages? Well consider a C#
assignment:

int index = 5;

This is written in a order that is comfortable for the brain. What is it?
it's an integer. 'Who' is it? Oh, it's index. What is it's value? Five.

Now consider VB and pascal.

dim index as integer = 5

var
index: integer;

In the vb-example things are really out of order. the dim keyword is the
action. then we got identity. it's type is crammed in the middle while only
the value is in the order in which we think.

Now here is the point. When we use programming languages that is out of
order, more mental energy is spent on just understanding what we see and
less on what to do. This is followed by the argument that we do more silly
mistakes in VB and Pascal than in C# and Java.

My personal experience is that this is true. I do most my code in C# and
Delphi and some of it in VB6 and VB.NET. I get more easily tired reading
basic than c-style languages.

Regards
- Michael S
 
Hi Micheal,

I truely agree with what you have said,
I for one have always had alot of problems reading my structures in vb
type syntax,
once i get too close to english or spoken languages i simply like you
mentioned make mistakes and tire easily, i have to admit to have made
the swap to c# quite fast, i have been working with .net for 3 and a
half years and i swaped to c# within 6 months of my first .net app.
though i started programming with c c++ and java and then went to vb...
so in a way im sticking to what i understand and know better. vb is
perfect for whats its supposed to be used for but by preference i
prefer a c-style language simply for its simplicity compactness and in
most cases it makes things easier to read...

Alexandre
 
i like the one for linux

here i will share one of my quote i never erased

" Most VB programmers are fine developers, but there is a large
proportion who are very lazy when it comes to understanding things that
C, C++, C#, and Java programmers regard as standard knowledge. "
 
My personal opinion?

VB was and is designed for casual programming. It allows you to hack
around, quickly get small programs working, and "try stuff out." It's
great for building, say, Word macros and writing little programs to pop
up information from database and the like.

However, VB by its very nature encourages a certain mental sloppiness
that comes back to bite you in the ass when you're writing anything
substantial. That's why people who write even moderately large systems
either prefer C#, Java, or C++, or find that VB starts to become a
problem, not a solution.

C# (and its cousins Java and especially C++) encourage a sort of mental
discipline when writing code. They're more exacting languages: they let
you get away with far, far less before they complain. They also (still)
require a bit of redundant information, and so point out typos and
other errors (although Anders is talking about making changes to remove
some of this redundant typing). You can get some of this effect in VB
by turning on the "strict" option, but then the very fact that VB has a
"non-strict" mode (and that's the default) bears out what I'm saying.

As such, C# code tends to be of better quality just because it
encourages you to think more clearly about what you're doing and not
just "hack around." However, this can be a "bad thing": if you _are_
just "hacking around" then C# often gets in your way.

I don't mind messing about in VB from time to time, just trying stuff.
However, I discourage its use as a serious language for building
serious systems.
 
Bruce,

your points are very interesting and i do agree, but the problem is
that students who are learning microsoft technologies in school are
learning VB or VB.NET as thier frist languege, im my opinion c or c++
should be ones first language to study since it takes more thought
process then other languages and its not too low level ...

Alexandre
 
Back
Top