C++ or VB? Thanks.

  • Thread starter Thread starter Miguel Dias Moura
  • Start date Start date
M

Miguel Dias Moura

Hello,

i am working in ASP.Net / VB web sites. However i need to take a
decision so i can buy some books and start studing some subjects.

For Web: C++.net or VB.net?
For Aplications: C++ or VB?

What are the positive and negative things about each one?
What should i choose?

I was looking at Visual page in Microsoft web site but it is difficult
to me to make a choice.

Thank You,
Miguel
 
C++ is great for low level hardware interaction & such.

VB.NET is for rapid application development, great for database applications
& such.
C# is sort of in between, but basically it's overall capabilities are
identical to VB.NET.
For web applications you should choose C# or VB.NET, it really doesn't
matter which one. Different people have different preferences, but if
someone tells you one is way better than the other be very skeptical because
they are not well informed.

The basic rule of thumb is that if you have experience with C or Java then
C# will be easier for you to learn.
If you have experience with classic VB (VB6, VBA, VBScript) then VB.NET is
the more natural way to go.
 
C# would definitely better for a C++ guy.
The syntax is just less weird, more comfortable (than VB).
However I think you could use C++ for ASP.NET without trouble if you're
already comfortable with it.
 
writing C# you'll not need to write as many, end if, end function end etc..
;-)

cheers,
mortb
 
Right, you just use curly braces which are not as self documenting, and
therefore they are (in my opinion) inferior.
 
if we are at this school field fight I think...
once you're use to it curly brace are as much self documenting (even more ,
you don't have to read all this text to understand it's just an 'end')

anyway curly brace are only 1 char (intead of lengthy Begin/End) therefore
your productivity is increased as you say more with less :)
 
I understand the curly brace involves less typing, but any good developer is
a very fast typist, plus there is intellisense which does most of the typing
for you, so I don't think that argument holds much water.
Sure a curly brace means "end" but it's the end of what? That can be quite
difficult to figure out when you have several code blocks nested inside
eachother. I find that to be very annoying and unproductive.
You have no such problems in VB.NET

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
 
I don't know for VB developer, but there is a convention with C/C++/Java/C#
developer to use indentation along with {}
which makes very clear the different level of nesting of code.
on top of that most IDE build this indentation automatically for you :)

maybe the C# code you read was written by someone who didn't know about
that, perhaps?

something like that:

public static Hashtable Read(string file)
{
if(!File.Exists(file))
return null;
try {
using(FileStream fs = new FileStream(file, FileMode.Open))
using(StreamReader sr = new StreamReader(fs))
return Read(sr);
}
catch { return new Hashtable(); }
}

isn't that lean and mean?
 
I disagree. It doesn't make it very clear.
Is this clear to you?
}
}
}
}


No, you'd have to scroll way up to the beginning to see what code blocks
started all this. Sometimes that's off screen.
 
;) ?
isn't it the same in VB?
how come all VB function are always less than 1 screen long?
could you show me an example, I don't get it....
 
My point is that with VB.NET it would look more like this:

End If
End With
Next
End Sub

That is much more self documenting. It is quite clear what code blocks
those are closing without having to scroll or look anywhere else.
You just don't get that with C#.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
 
Okay, guys, you say "tomato," I say "potato." I think we can all agree that
we're talking about apples here.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top