|
Not necessarily, for instance:
VB.net has certain restrictions on how you can format your code (e.g. linebreaks) that C-like languages just don't have.
C-like languages have multi-line comments, VB.net does not.
In C# I can make an event based on a delegate that returns a value, in VB.net you can't. While that's not something most situations require, it's nice to know I can when I need to.
C# has auto-implemented properties, VB.net does not (at least not in the version I have to use at work).
That's what comes to mind at the moment and my dinner is getting cold.
|
|
|
|
|
If someone is used to one language and regards having to use another as a trial, no amount of discussion, explanation, or examples will convince him that his problems lie within himself and not the language.
Suffice to say that for every goody that C# has, VB.NET has a one,too, a different one. For every gotcha that VB.NET has, C# has one, too.
When it comes to C# and VB.NET, there's nothing wrong in preferring one language over another, but folks who think that their personal preference represents a real-world value judgement that should be recognized by all is making a mistake. Developers who go so far as to claim that all or most of their peers who use their language choice are superior in skills and ability to those who use the other, are amusing. Developers who refuse to learn as much as possible about any language that might get them a job are shooting themselves in the foot.
The 3-legged stool of understanding is held up by history, languages, and mathematics. Equipped with these three you can learn anything you want to learn. But if you lack any one of them you are just another ignorant peasant with dung on your boots. R. A. H.
|
|
|
|
|
C-like languages have multi-line comments, VB.net does not.
|
|
|
|
|
|
Well we have horrible practioners in both languages here. It really does come down to experience and training in both (or any) language.
|
|
|
|
|
jim norcal wrote: Very few articles on Code Project and other sites. ...So, what am I supposed to do?
Sure its a crazy thought but...why don't you write some?
|
|
|
|
|
Well worded post and valid concerns.
I think it's a matter of syntax, don't worry though, you can pick up C# real quick if you want to.
"I have a theory that the truth is never told during the nine-to-five hours. "
— Hunter S. Thompson
|
|
|
|
|
There are tons of new tutorials for VB.Net, MS have just released Light Switch, and all the demos are pretty much exclusively in VB.NET. It won't die, MS make programming for all types of people, including people that shouldn't be programming, but they can, because of VB and VB.net.
I'm not slating VB.Net, We use it for our major project without issue, and you've got to admit, XML literals are ace. We also use C# for another project, and I really miss the WithEvents keyword 
|
|
|
|
|
...and automatic event wireups 
|
|
|
|
|
I started VB with 1, after years of programming in FORTRAN, COBOL, Clipper, and QuickBasic. I never did use procedural programming, but did modular programming. That made the transition to OOP inVB4 through 6 pretty easy. Since my VB6 programs were OO, they ported easily to VB.NET.
I also learned C# several years ago. I program in C# where I work since C# is the comfortable choice for the decision makers with a Java and C background. I program in VB.NET for my own development. I find VB.NET to be more productive, even in complex n-tiered apps. VB.NET does everything C# does, so why should I program in a 1960s throwback style when I can program in a simpler, more powerful syntax?
I hear the anti-VB folks talk about C# being more "elegant". Huh? What does that mean? My wife and daughter are elegant. I don't want my language of choice to be girly or curly. I think "elegant" is used in the context of programming languages when one is unable to give a coherent reason for using a language.
Simply put, if Java or C/C++ is your background, then use C#. If VB6 is your background, then use VB.NET. If you want to be mire hirable, know both well. After all, 80% of being an excellent .NET developer is knowing the framework.
|
|
|
|
|
Hummmmm! Interesting!
I started with VB in 1994 and move to c# in 2000, then back to VB and again back to c#. If you are a vb developer I feel you will be able to make an easy transition to c#. I see they both are very similar in performance, and different in syntax. However, if you have developed web sites, chances are you have used JavaScript. I personally like C# better because I think it is more standard and in a certain way close to Java and JavaScript. As far as VB being retired, I do not think so. As far as c# being more popular, yes of course.
At the end , the choice is yours.
|
|
|
|
|
MSBassSinger wrote: I started VB with 1,
I started with VB for DOS - now that was a strange animal!
The 3-legged stool of understanding is held up by history, languages, and mathematics. Equipped with these three you can learn anything you want to learn. But if you lack any one of them you are just another ignorant peasant with dung on your boots. R. A. H.
|
|
|
|
|
From Dictionary.com:
el·e·gant /ˈɛlɪgənt/ Show Spelled
[el-i-guhnt] Show IPA
–adjective
1. tastefully fine or luxurious in dress, style, design, etc.: elegant furnishings.
2. gracefully refined and dignified, as in tastes, habits, or literary style: an elegant young gentleman; an elegant prosodist.
3. graceful in form or movement: an elegant wave of the hand.
For most of us who use the term, programming elegance is expressed by the third definition. C, C++, etc. use fewer symbols to convey more meaning, the C-like syntax imparting grace through requiring fewer decorations. Thus, it appears to be purely a matter of taste at first.
My experience, though, is that their are more programmers who are better programmers who appreciate the elegance of C-like syntax than there are programmers who are better programmers who prefer the wordier but more easily remembered keywords and forms of languages like VB.NET, FORTRAN, and COBOL. That experience may be influenced by the fact that I've had to maintain C code written by BASIC programmers as well as BASIC code written by C programmers - let me tell you, the better attempt was NOT made by the BASIC programmers. C-like syntax is harder to learn than wordier syntaxes, so it's less likely that any given BASIC programmer can learn C that it is that any given C programmer can learn BASIC, given equal exposure or lack thereof to the system being learned. Unfortunately, given this observation, since smarter people usually write better code, it is strongly suggested that more of that better code is being written in C# that is being written in VB.
I expressed this opinion well before the advent of .NET when my client (and former employer at the time) expressed surprise that I would reject C/C++ for a new project he was staring. First, I told him, you'll need a database management system for what you want to do, which means that if you have Access, you can build a prototype with little difficulty; second, Access used (and still uses) a dialect of BASIC, and BASIC programmers are cheap and easily disposable because fewer of them are going to write code that requires deep intellect to understand and maintain, thus new programmers will spend less time getting up to speed on what their predecessors were doing. Note that the application my client wanted to build, while complex, was not "rocket science"; if it had been "rocket science", I would have recommended C/C++ as the develompent language without hesitation, simply because we'd attract a better class of programmer to the problem.
I think this is not as true as it once was, for the very reasons that several in this thread have noted that suggest that VB.NET and C# are interchangeable: each one is using the same runtime library, which makes the syntax the only real difference between the two languages, and that runtime library far more resemebles the wide offerings with obscure options offered by C than it does the more restricted list of standard functions offered by MS BASIC...implying that the same skills must be available (to use the runtime library) whether you use VB or C#.
I spent most of the first half of my career programming in C. I've spent much of the second half programming in dialects of Basic (VBA and previous dialects (e.g. WordBasic), VB 6.0, VB.NET, VBScript) while also learning and using Java, Javascript, and C#. But, to keep things in perspective...I did my graduate research project using Prolog, which uses a wildly different paradigm than either C# or VB (if anything, it resembles SQL in its usage if not in syntax). In those days, only languages such as Lisp, Prolog, and other lesser-known examples could offer the functionality that the addition of generics and lambdas have brought to VB and C#.
So, at this point, in my opinion, it is simply a matter of taste when deciding between the languages. Neither offers significantly greater capability than the other (though, so far, it seems that C# gets new language features before VB). Each can use assemblies written in the other. Each can easily be rewritten into the other language, at least in my experience to date (I maintain and build applications, assemblies, and components in both languages and have had to perform conversions when moving code from a C# application or DLL to VB instance of the same).
As to the likelihood that MS will drop BASIC...what are the odds that that will EVERY happen, given that BASIC was the very first product Microsoft ever offered for sale? If MSDOS had never been written, Microsoft would still be well known as having set the standard for BASIC interpreters (remember Applesoft Basic, anyone?) for the entire early history of the PC. Granted, Bill Gates has stepped away from the company and with this stepped away from his long support of the continued advancement of BASIC within Microsoft, but he was not alone. BASIC is still easier to learn for most people than the C-like languages, so it will continue to offer a wider range of people the chance to program (until some successor proves even easier to learn while also providing as complete a set of functionality, which despite numerous attempts (e.g. Java) still hasn't happened yet).
I think any rumors of the death of Visual Basic are as likely to be real as the "sure-fire" prophecies I've been hearing for twenty-odd years about the impending death of COBOL. Quit worrying about it, and sharpen your search skills so you can find more VB sites.
|
|
|
|
|
I dont care what others say but I still vote for VB.
I can program with VB and C# with equal ease but prefer the former because it lets me concentrate on my programming and logic rather than syntax. This actually saves me a lot of time with capitalization of variables. Think of it and calculate. if you have one capital for a variable and you have 10 variables and use it 10 times in your class, that means in C# you are using the "shift" key 100 times more. doesnt it give us that much more time? VB does it for you.
So what if isnt OOPS strictly. It gets the work done and thats it. And it lets me get the work done easily.
And if MS were to dump VB I will write my own compiler for it and sit on a hunger strike till they give me the code for the compiler.
|
|
|
|
|
kenSemantics wrote: VB does it for you.
Yes VB does a lot for you, but that is a problem. It allows for stupid things to be done without the developer having to actually think about what they are doing.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: It allows for stupid things to be done without the developer having to actually think about what they are doing.
I have seen some really horrifying code written by developers (who obviously weren't thinking) in C#. You seem to want to blame the language for the faults of the programmer. In truth, inferior programmers will write inferior code in any language and superior programmers will write superior code in any language.
The 3-legged stool of understanding is held up by history, languages, and mathematics. Equipped with these three you can learn anything you want to learn. But if you lack any one of them you are just another ignorant peasant with dung on your boots. R. A. H.
|
|
|
|
|
Oakman wrote: You seem to want to blame the language for the faults of the programmer
I think you should read my comments more carefully.
http://www.codeproject.com/Lounge.aspx?msg=3978112#xx3978112xx[^]
"Not that the language itself is bad, the developers using it, IMO, mostly, don't have the skills, training, or experience to write software in the best manner."
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: I think you should read my comments more carefully.
You're absolutely right. I apologize.
The 3-legged stool of understanding is held up by history, languages, and mathematics. Equipped with these three you can learn anything you want to learn. But if you lack any one of them you are just another ignorant peasant with dung on your boots. R. A. H.
|
|
|
|
|
really, isnt it the responsibility of the developer to take care of what he is writing?
if the language does something without his knowing then he is just a bad programmer.
|
|
|
|
|
kenSemantics wrote: isnt it the responsibility of the developer to take care of what he is writing?
Correct
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Oh, sod it all, let's just use Python 
|
|
|
|
|
jim norcal wrote: So, what am I supposed to do? Just stop using it
Yes.
Speaking from my recent and on-going experience of working, or attempting to, with a VB.NET project, the code is poorly sturctured, undocumented, unsecure and performs poorly. In general it has been my experince that C# developers are more versed in OO and actually code using these principles. In this recent project there are ~5000 lines of VB.NET in two files. I reengineered using C# with a nTeired approach so that it now has 17 files with ~3000 lines, including unit tests. This is why VB.NET can, and should, be phased out. Not that the language itself is bad, the developers using it, IMO, mostly, don't have the skills, training, or experience to write software in the best manner.
C# is also more closely related to other langauages, such as JavaScript, so the transition between them in a web application would be much easier and developers more productive.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
For anyone reading Mark's response, it's important to note his qualifier, "In general".
What he says is true. This is not to say that every VB programmer is less sophisticated than every C# programmer; there are some very good developers who happen to prefer VB.
However, in the general sense, my experience has also been that people who develop in VB don't have has strong a grasp of the underlying fundamentals as those in C#. Thus, their applications are not as robust.
For me, it seems as if the tools which go along with VB just don't work quite as well as with C#. Intellisense, for example: it seems as if, once I've made a syntax error in VB, inellisense just quits working, and it's more forgiving in C#.
|
|
|
|
|
agolddog wrote: For me, it seems as if the tools which go along with VB just don't work quite as well as with C#. Intellisense, for example: it seems as if, once I've made a syntax error in VB, inellisense just quits working, and it's more forgiving in C#.
That is just plain silly. You don't want immediate feedback when you have typed bad code??? You are right, since intellisense in C# is far less aware of what is being written, C#, much more often than VB.NET, must compile bad code before spotting an error. I have never regarded that as a feature to be touted, but a failing that must be borne.
The 3-legged stool of understanding is held up by history, languages, and mathematics. Equipped with these three you can learn anything you want to learn. But if you lack any one of them you are just another ignorant peasant with dung on your boots. R. A. H.
|
|
|
|
|
Oakman wrote: That is just plain silly.
A very mature attitude.
Oakman wrote: You don't want immediate feedback when you have typed bad code???
Then how do you explain this?
In VB.NET this won't flag anything in intellisence nor when compiled. It will throw an exception at runtime.
Dim i As Integer
Dim x As String
i = 0
x = "foo"
If i = x Then
End If
In C# intellisence will show the error and it won't compile.
int i = 0;
string x = "foo";
if(i == x)
{
}
Oakman wrote: since intellisense in C# is far less aware of what is being written, C#, much
more often than VB.NET, must compile bad code before spotting an error.
Care to re-state this?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|