Thread: Visual Basic
View Single Post
  #7   Spotlight this post!  
Unread 13-11-2007, 14:54
jee7s jee7s is offline
Texan FIRSTer, ex-frc2789, ex-frc41
AKA: Jeffrey Erickson
FRC #6357
 
Join Date: Nov 2007
Rookie Year: 1997
Location: Dripping Springs, TX
Posts: 315
jee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond repute
Re: Visual Basic

Actually, those semi-colons are really useful in C/C++/C#. In all three cases, you can write several lines of neatly formatted code (a long string or calculation for instance) without needing to do an actual concatenation.

Also C/C++/C# allows for "fall through" switch/case statements. which are valuable. Conditional statements are also more concise, since C/C++/C# all interpret the value 0 for byte, int, long , etc as a false bool. This, along with the ?: operator in C# allows for this:

int i = 0;
string str = (!i) ? "Is Zero" : "Is Not Zero";

which would look like this in VB:

Dim i as Integer
Dim str as String
i = 0
If(i == 0)
str = "Is Zero"
Else
str = "Is Not Zero"
End

As you can see, the C# code is much more concise than the VB code.

Also, you may love doing VB for now, when it's all for play, glitz, and glam. However, if you pursue CS or EE as a profession later on, you will quickly learn that VB is "programming for business majors." (i.e. there is no rigor to it) Real (professional) programmers and engineers pay a great deal of attention to data structure, argument passing, type casting, etc...all of which VB is very loose with.