|
C# verses VB.Net
-
06-06-2006 4:45 PM
|
|
-
Diamonds


- Joined on 05-01-2006
- Posts 15
|
I'm having an arguement with a coworker that wants me to use VB.Net instead of C# to program our ASP.Net application. I want to use C# because most programmers out of college learn Java, and C# is much closer of a syntax than VB is. We are going to hire 2 people for this project who just graduated from college. The college we are hiring from teaches Java.
His arguement is that VB.Net is much more previlent in the industry and that using C# goes against the industry standard. I have a suspicion that he really just doesn't want to learn C# because he already knows VB. (he's not even on the project)
Anyways, please help.
|
|
-
-
Oscar L


- Joined on 04-05-2006
- Portland, OR
- Posts 241
|
I think I can already see where this is going.
Try to think of it in terms of a negotiation token rather than a life or death decision. You're a smart, saavy IT professional, right? Not at all like those language bigots out there. You know it doesn't really make a whole heck of a lot of difference at the end of the day, so figure out how to use the point of contention to your advantage. Want to put more VB.Net experience on your resume? Give in grudgingly at the end and ask for concessions somewhere else, even if all you get out of it is a free ice cream sundae.
|
|
-
-
ammoQ


- Joined on 04-13-2005
- Vienna.Austria.Europe.Earth
- Posts 3,330
|
My advice is: Don't mix languages. .net allows you to do that, on a technical level, but it's not a good idea. Maintaing becomes much harder if you do. Either you win or your coworker wins. Anyway, I think it's not bad for Java-programmer like you and your yet-to-hire coworkers to learn another language. If a Java programmer starts C#, he will inevitable use it the Java way. This would not be extremely terrible, but ugly anyway. Take your chance to learn another language and a bit more of .net anyway. BTW: Tell your coworker to forget this "industry standard" nonsense. Simply not true. Both languages are commonly used.
beanbag girl 4ever
|
|
-
-
jsmith


- Joined on 01-10-2006
- Posts 165
|
Another point is that it is easier to translate C# to VB than the other way around. VB uses parentheses to mean too many things to narrow it down without reflecting the original VB code. So, if you do end up with a half and half project, it will be easier to make it all VB than all C#. It's also easier to translate C# found on the Internet to VB for the same reason. Good commercial converters have no problem, but the free stuff on the Internet likes C# to VB better.
Sometimes C# can be a little better -- I use C# for our Image library because of its support for unsafe code. GetPixel is really slow, so unsafe is a life saver there.
However, some things are easier in VB. Raising a custom event is 10 times easier in VB than it is in C#. The IDE is also better at making overloads in VB (prior to 2005). The VB IDE is far nicer than C#... it doesn't force you to rebuild to update Intellisense and it can even give you some Intellisense for code that won't compile. VB also fixes case where the C# IDE thinks you meant something different. All the little things add up to a smoother experience and lets you concentrate on what you are doing.
Being closer to Java is not really a good thing. The programmers may keep thinking they are writing Java and screw it up. The real work is learning the framework and that is the same for VB and C# and very different from Java.
At the end of the day, whoever sticks to their guns the most is wrong. Neither language is wrong, thinking that this is a major decision is the big mistake.
|
|
-
-
dhromed


- Joined on 04-13-2005
- Dutchland
- Posts 2,604
|
Doesn't .Net default to C#, like ASP Classic defaults to VBscript?
Why are we still using VB?
— Flurp.
|
|
-
-
Alex Papadimoulis


- Joined on 10-16-2004
- Cleveland, OH
- Posts 2,043
|
I'd be more concerned about the college kids joining the project than anything else.
But I concur with the others -- it's not a big deal and an experienced programmer can use either. You can stack up pros/cons on both sides of the scale, but at the end of the day, so long as you use OptionStrict/Explicit, there's no real difference.
|
|
-
-
-
lpope187


- Joined on 03-05-2006
- York, PA
- Posts 372
|
Alex Papadimoulis:I'd be more concerned about the college kids joining the project than anything else.
But I concur with the others -- it's not a big deal and an experienced programmer can use either. You can stack up pros/cons on both sides of the scale, but at the end of the day, so long as you use OptionStrict/Explicit, there's no real difference.
The real WTF is that MS doesn't turn those on by default. I hate having to both enable it on the project and then stick it at the top of each source file in case people turn it off. Larry
“A system is a network of interdependent components that work together to try to accomplish the aim of the system. A system must have an aim. Without the aim, there is no system.”
W. Edward Deming
|
|
-
-
Oscar L


- Joined on 04-05-2006
- Portland, OR
- Posts 241
|
lpope187: Alex Papadimoulis:
I'd be more concerned about the college kids joining the project than anything else.
But I concur with the others -- it's not a big deal and an experienced programmer can use either. You can stack up pros/cons on both sides of the scale, but at the end of the day, so long as you use OptionStrict/Explicit, there's no real difference.
The real WTF is that MS doesn't turn those on by default. I hate having to both enable it on the project and then stick it at the top of each source file in case people turn it off. Larry
Meanwhile MS support staff and forum moderators are overwhelmed with exchanges that look like this:
VBMan4242: WTF? VS.NET keeps telling me I have to "Dim" stuff! WTF does this mean??? I need help ASAP as my project is due in two hours! I've tried putting quarters into the corner diploma vending machine several times with no results. Help!
JSmith[MS]:VS.NET is informing you not that you need to "dim" anything, but that you yourself are dim. Have a nice day.
|
|
-
-
Albatross


- Joined on 10-31-2005
- Calgary, AB
- Posts 307
|
Oscar L: lpope187: Alex Papadimoulis:
I'd be more concerned about the college kids joining the project than anything else.
But I concur with the others -- it's not a big deal and an experienced programmer can use either. You can stack up pros/cons on both sides of the scale, but at the end of the day, so long as you use OptionStrict/Explicit, there's no real difference.
The real WTF is that MS doesn't turn those on by default. I hate having to both enable it on the project and then stick it at the top of each source file in case people turn it off. Larry
Meanwhile MS support staff and forum moderators are overwhelmed with exchanges that look like this:
VBMan4242: WTF? VS.NET keeps telling me I have to "Dim" stuff! WTF does this mean??? I need help ASAP as my project is due in two hours! I've tried putting quarters into the corner diploma vending machine several times with no results. Help!
JSmith[MS]:VS.NET is informing you not that you need to "dim" anything, but that you yourself are dim. Have a nice day.
LOL that's awesome.
I'm usually a VB programmer because it looks (in my opinion) cleaner than C# (I *hate* curly braces), but with about an hours notice, I can switch to the other one. Why? because both languages are the same, except for curly-braces vs begin-end blocks. They have the same IDE, the same library, the same everything.
And BTW, I think ASP.Net defaults to VB, but I'm not sure.
It's funny because it's out of context.
|
|
-
-
lpope187


- Joined on 03-05-2006
- York, PA
- Posts 372
|
Albatross: Oscar L:Meanwhile MS support staff and forum moderators are overwhelmed with exchanges that look like this:
VBMan4242: WTF? VS.NET keeps telling me I have to "Dim" stuff! WTF does this mean??? I need help ASAP as my project is due in two hours! I've tried putting quarters into the corner diploma vending machine several times with no results. Help!
JSmith[MS]:VS.NET is informing you not that you need to "dim" anything, but that you yourself are dim. Have a nice day.
LOL that's awesome.
I'm usually a VB programmer because it looks (in my opinion) cleaner than C# (I *hate* curly braces), but with about an hours notice, I can switch to the other one. Why? because both languages are the same, except for curly-braces vs begin-end blocks. They have the same IDE, the same library, the same everything.
And BTW, I think ASP.Net defaults to VB, but I'm not sure.
I agree that is awesome - it does sum up what would happen if MS had done that. But since I wouldn't have to answer the questions and it would solve my problems, I wouldn't care. It might actually drive out some of the WTFers. But since MS didn't do that, I guess I'll just have to get the operations guys to push those registry settings through the login script and then lock them down. I've been programming in VB6, VBA, or VB.NET as my primary language for about the past 8 years. Although I've gotten used to it, I much prefer the C family of syntax as it was the first language I learned. For me, I like the simpler syntax expecially for logical operators. I prefer "if !someValue" over "If Not someValue Is Nothing". I constantly stumble over that syntax in VB since my brain says it should be "If someValue Is Not Nothing" which of course the compiler hates. Personally, I don't care what language you use as long as you adhere to best practices including OOP, exception handling, tiered designs, etc. I can pick up the syntax by googling or searching MSDN. As far as whether ASP.Net defaults to one language or another, I'm not even sure it's possible in .Net. I've never seen a similiar option in IIS to set it like you could for classic ASP (Jscript vs VBscript) - I guess it could be in the web config file though. Doesn't the framework handle compilation for code-behind based on the extension (.cs or .vb) and inline based on the language attribute of the page directive? I've never built an ASP.Net page outside of the VS IDE. I just modify the templates your given when you add a new web form. Larry
“A system is a network of interdependent components that work together to try to accomplish the aim of the system. A system must have an aim. Without the aim, there is no system.”
W. Edward Deming
|
|
-
-
xrT


- Joined on 04-28-2006
- Posts 232
|
IMO, like most of the posts here, it's more like a personal preference since they only differ mostly in syntax, although I read books that it is possible that some language (or compiler that is) that supports (or will support) the CLR may include in itself their own language specs / enhancements (like case-insensitivity in VB, etc).
This would be true of course if all the developers code with the framework in mind. And since both support one framework then there should be no problem reading other codes written in a different language. I myself used VB.NET and C#, but mostly C# recently, and I find it to be just syntactically different.
"I'm happier than a wooden spoon at the spelling bee."
|
|
-
-
masklinn


- Joined on 09-07-2005
- Posts 653
|
Diamonds:I'm having an arguement with a coworker that wants me to use VB.Net instead of C# to program our ASP.Net application. I want to use C# because most programmers out of college learn Java, and C# is much closer of a syntax than VB is. We are going to hire 2 people for this project who just graduated from college. The college we are hiring from teaches Java.
His arguement is that VB.Net is much more previlent in the industry and that using C# goes against the industry standard. I have a suspicion that he really just doesn't want to learn C# because he already knows VB. (he's not even on the project)
Anyways, please help.
anyone who uses "industry standard" in an argument should be smacked on the head at the spot, and subsequently burned at the stake.
"Well, take it from an old hand: the only reason it would be easier to program in C is that you can't easily express complex problems in C, so you don't." - Erik Naggum (in comp.lang.lisp)
|
|
-
-
Oscar L


- Joined on 04-05-2006
- Portland, OR
- Posts 241
|
masklinn: Diamonds:
I'm having an arguement with a coworker that wants me to use VB.Net instead of C# to program our ASP.Net application. I want to use C# because most programmers out of college learn Java, and C# is much closer of a syntax than VB is. We are going to hire 2 people for this project who just graduated from college. The college we are hiring from teaches Java.
His arguement is that VB.Net is much more previlent in the industry and that using C# goes against the industry standard. I have a suspicion that he really just doesn't want to learn C# because he already knows VB. (he's not even on the project)
Anyways, please help.
anyone who uses "industry standard" in an argument should be smacked on the head at the spot, and subsequently burned at the stake.
Would that be with an industry standard Clue x 4?
|
|
-
-
Diamonds


- Joined on 05-01-2006
- Posts 15
|
Thanks for your input everyone.
Re: college students I'm actually really looking forward to working with them. College students have the nice natural ability to learn things very very fast. Which is pretty much a requirement in my companies work enviroment.
VS.2003 defautls new ASP.Net projects to whatever language you selected it in. If you take out the tag I think the default is VB.
I think the best argument I've heard from people is that VB is a 'for dummies' language, but it can be very powerful. I feel that I'll get smarter programmers, and will be able to identify weak links by using C# over VB.
|
|
-
-
GoatCheez


- Joined on 11-21-2005
- Tampa FL, USA
- Posts 515
|
I had this very discussion with someone in the WTF forum. Here's the link. Ignoring the personal attacks, I believe the points I make as to why to use C# over VB speak for themself. My personal opinion is that VB.NET should never be used over C# unless most of the people on the project have never use any language other than VB. You have to get at least into halfway through page 2 I think to really get at the true reasons.
#include <disclaimer> char GoatCheez[]="brillant!";
|
|
-
-
Jeff S


- Joined on 11-22-2004
- Boston MA
- Posts 1,003
|
GoatCheez:I had this very discussion with someone in the WTF forum. Here's the link. Ignoring the personal attacks, I believe the points I make as to why to use C# over VB speak for themself. My personal opinion is that VB.NET should never be used over C# unless most of the people on the project have never use any language other than VB. You have to get at least into halfway through page 2 I think to really get at the true reasons.
[don't worry, I have no intention of hijacking this thread, which as been a good, intelligent discussion so far. :) ] GoatCheez -- if the "personal attacks" you mention are referring to anything I wrote, please let me know specifically what I wrote and I will immediately apologize. I did not intend to personally attack you.
I did not become a TDWTF forum moderator to make friends. And by the way, I haven't.
|
|
-
-
GoatCheez


- Joined on 11-21-2005
- Tampa FL, USA
- Posts 515
|
So upset that you follow to another thread eh? Jeff S: GoatCheez:I had this very discussion with someone in the WTF forum. Here's the link. Ignoring the personal attacks, I believe the points I make as to why to use C# over VB speak for themself. My personal opinion is that VB.NET should never be used over C# unless most of the people on the project have never use any language other than VB. You have to get at least into halfway through page 2 I think to really get at the true reasons.
[don't worry, I have no intention of hijacking this thread, which as been a good, intelligent discussion so far. :) ] GoatCheez -- if the "personal attacks" you mention are referring to anything I wrote, please let me know specifically what I wrote and I will immediately apologize. I did not intend to personally attack you.
No intentions of hijacking this thread, even though your intentions are
obviously to get a response from me pertaining to your most recent post. Jeff S: Goat cheeze -- who cares what that particular person thinks of
their programming skills? Does this intimidate you? Do these "vb
programmers" hurt your feelings or affect your career? Should no one
ever be allowed to write any code other than people with 4-year college
degrees, multiple certifications, and 10-years of assembly experience?
Hobbyist programmers shouldn't exist? RAD programming that small
companies often need shouldn't be allowed? All code should be in one
of the languages that you approve of? (have you published a list yet,
by the way?)
Labelling all vb programmers in this manner makes
you sound bitter, jaded, ignorant and close-minded; grow up, open your
eyes and try opening your mind a little.
I don't need to explain how this is a personal attack. Jeff S: Thanks! That was a close one. I did not realize that if I start a new
project in VB.NET it will end up being the only language I am
comfortable in and I will end up forgetting any other language that I
know and being jobless and wandering the streets speaking only latin in
5-years! It's a shame that Vb and C# don't share any common libraries
or programming concepts...
In case some people are uninformed: Using sarcasm in this context implies that Jeff wants people to think that I am of inferior intelligence (retarded/stupid). Jeff S: I give up. I suppose any time you ignore the context of any sentence in
any conversation you can blindly draw whatever logical conclusions you
want for your own self-satisfaction.
Do I need to explain this as well? Jeff S: You must be quite a hit at cocktail parties! :)
What does my social interaction have anything to do with the discussion? Jeff S: OK. Ummm ... let's just move on, I'll give you a mulligan on that
one. (I love the irony of you finding flaws in my logic and asking me
to do research .. he he ) You are telling me that because those two
statements do not produce the same code, VB.NET is backwards
compatability with VB6. If you are *not* saying that (even though you
did :) ) then please try to clearly state your point.
You say that you will give me a mulligan, implying our conversation is a game to you. Then you try to mock me for pointing out the flaws in your logic, which are VERY numerous. I didn't comment on this before because I probably missed it. If you had read the articles I had listed, you would know what I was saying. They do not produce the same code because in VB6, when you did s1 = s2, and one of the strings was null and the other was "", the result was true. This is the same in .NET for backwards compatibility. In C#, s1==s2 where one is null and the other is "" results in false. is you were to do s1.Equals(s2) in VB.NET, you would get the same results as the C# comparison. Jeff S: Ok, you've strung me along with this enough. ha ha. you got me.
seriously, I've got to stop falling for this trolling stuff and not
assume that everyone is actually trying sincerely to discuss the topic
... go ahead, laugh it up ...
Jeff: you are constantly putting words into other people's mouth for the sake of "discussion", then when they defend their words you call them a troller. I honestly do not understand what you are thinking. Here it is... Any responses will be left with no reply, I'm done.... Why C# is a better choice than VB.NET: Both languages are equivelent by most standards. Both use the same underlying API, and both have basically the same features, although there is a feature or two that one will have that the other does not. These features can be dismissed because programming around them is not difficult. So then, why does such a heated discussion rage on? Lol. I started writing my personal opinion, but deleted it. I honestly feel that my personal opinion on WHY should be kept to myself. Ok, so then which should I use on my new project, VB.NET or C#? Well, that depends on a couple things. If anyone in the project group has never learned another language other than VB, then go with VB.NET. Chances are that C# is just too different for them to grasp quickly enough. All other cases should go with C#. The reasoning: It will be easier to maintain in the long run. The maintenance has VERY LITTLE IF ANYTHING to do with the actual language. The only way language plays into it is in the form of the s1=s2 note. The fact is that most students learn Java or C. C# is EXTREMELY easy to pick up if you are coming from one of those backgrounds. You and your team probably won't be working on that project forever, so if you do pick up another person, they will most likely either know C#, or will be able to pick it up really fast. If they are limited to just using VB, then it was a bad hire. A programmer that is limited in their language selection is a limited programmer.
#include <disclaimer> char GoatCheez[]="brillant!";
|
|
-
-
Jeff S


- Joined on 11-22-2004
- Boston MA
- Posts 1,003
|
Sorry about the "cocktail party" joke ... I didn't think it was too offensive, I was kind of goofing around (i.e., did you see the smiley face?) but it was off topic and personal, so I apologize. That was rude and wrong and I am sorry it upset you. Please accept my apology. Heck, it didnt' hurt my feelings to omuch when you told me I should have learned basic logic in basic geometry, or that I should not call myself a programmer due to my lack of logic skills, or that I should "do my research", but I understand that we all have different levels of self-esteem and respond differently to different words. I will try to remember this in any future correspondence between us and promise to respect your feelings.
However, everything else you accuse me of has nothing to do with personal attacks, and every "tactic" you accuse me of using -- sarcasm, being condescending (how many times do you tell me I should do some research or learn basic logic), putting words in mouths, changing things around, etc -- is an oddly accurate description of what you did.
What is really rather humorous about this whole thing is this: what were my points? What was my position? Where was I coming from? I bet you don't even know. VB is better than C#? VB is "cool"? I am smarter than you because I like VB? You should be using VB? I only know VB and that's all I need to know? VB6 was a good language? There are no bad VB programmers out there? Nope. yet you were fighting and hammering away at me like I was trying to shove those ideas down your throat.
My points were quite simple:
a) VB.NET does not "suck"
b) All programmers who prefer VB are not "idiots"
c) It is not a "bad idea" to start a "new project" in VB.NET
That is what the "debate" was about. That's it. Those were my points. And those were the points that *you* were trying to refute over and over in any way you could, throwing random opinions and observations and "researched facts" out there, many of which were not only untrue, but often had nothing to do with VB.NET at all, and eventually you were forced to admit as much!
Ironically, I prefer C#, always have. I also would like to see those starting out in programming, who intend to make a career out of it, learn C# first. Yet you were so blind with your ignorance* on the topic that you didn't even understand what we were "debating" about.
--
* No, that is not a personal attack -- your postings and your
stance and your general remarks about "vb programmers" as well as your many
incorrect and misleading "researched facts" about VB.NET show a very high level of ignorance on
this topic; note that this does mean that you are an ignorant person in
general.
I did not become a TDWTF forum moderator to make friends. And by the way, I haven't.
|
|
-
-
-
GoatCheez


- Joined on 11-21-2005
- Tampa FL, USA
- Posts 515
|
Why C# is a better choice than VB.NET:
Both languages are
equivelent by most standards. Both use the same underlying API, and
both have basically the same features, although there is a feature or
two that one will have that the other does not. These features can be
dismissed because programming around them is not difficult.
Ok, so then which should I use on my new project, VB.NET or C#? Well, that depends on a couple things.
If
anyone in the project group has never learned another language other
than VB, then go with VB.NET. Chances are that C# is just too different
for them to grasp quickly enough.
All other cases should go
with C#. The reasoning: It will be easier to maintain in the long run.
The maintenance has VERY LITTLE IF ANYTHING to do with the actual
language. The only way language plays into it is in the form of the
s1=s2 note. The fact is that most students learn Java or C. C# is
EXTREMELY easy to pick up if you are coming from one of those
backgrounds. You and your team probably won't be working on that
project forever, so if you do pick up another person, they will most
likely either know C#, or will be able to pick it up really fast. If
they are limited to just using VB, then it was a bad hire. A programmer
that is limited in their language selection is a limited programmer.
#include <disclaimer> char GoatCheez[]="brillant!";
|
|
-
-
ammoQ


- Joined on 04-13-2005
- Vienna.Austria.Europe.Earth
- Posts 3,330
|
GoatCheez: The fact is that most students learn Java or C (...) if you do pick up another person, they will most
likely either know C#, or will be able to pick it up really fast.
On the other hand, you might want to reconsider this argument once you see C# programs with getFoo()/setFoo(Foo foo) methods, made by Java programmers who do as they always did. And I don't even want to imagine what a hardboiled C coder could do with C#. For that reason, I think it's not too bad that those programmers (comming from Java or C) have to learn the new syntax of VB.net, so they can also learn how to do things the .net way.
beanbag girl 4ever
|
|
-
|
|