What is the best language? RRS feed

  • Question

  • User910861462 posted
    I bet this is going to stir some people up ;)

    What is the best language to use with .NET? Now personally, I am a VB kind of guy because of ASP, but have done some C++ in the past (the real simple stuff, like what you first learn in a high school ap comp sci class). One thing I've noticed is most of the more advanced samples and articles online are done in C#. What is so great about C#, vs VB and C++? I've heard C# executes faster than VB, but would that only apply to the first time the page is compiled, because isn't it also true that each time a page is accessed after it has been compiled it is done so in the CLR? So then, does it not matter what language a given page is in? Now my understanding on the speed of a page execution is not necessarily the language, but rather how much data the processor has to go through. VB has longer and more words than say C++ or C#. Does it make that much of a difference?

    Is VB designed more for the hobbyist or beginner, and C# more for the enterprise level guys?

    Also, is VB or C++ destined for death in future versions of .NET? I mean, C# is new, but looks a lot like C++, so then is C++ not going to be supported in the future?

    Just some thoughts from a loley VB programmer getting tired of translating from C# ;).
    Thursday, June 9, 2005 3:35 PM

All replies

  • User-1630302068 posted
    oi, so many misconceptions i dont know where to start.
    There is no 'the best language' only 'the best language for the task'.  VB & C++ are not going to go away any time soon.  VB is great when you need to get something done, and it needs to be done yesterday.  Managed C++ is painful, but if you have millions of lines of C++, it's a nesecity.  I dont know this for a fact, but you can probably also collect your own garbage w/ managed C++. 

     I doubt that any fully-managed language would be faster or slower than any other fully-managed language. 

    C# was designed to "Make the easy things easy, and the hard things possible". That is actually a Larry Wall quote, but it was by the language designer's admission, a design goal.  

    As for translating from C#, get used to it.  You're not allowed to complain about it anymore.  The only thing you're allowed to complain about is the quality of the code you're translating.  Most C# i've seen hasnt been 'that bad'.  This is probably because most C# people come to the language after learning how to write good code.

    Friday, June 10, 2005 8:26 AM
  • User1416329745 posted
    I write C# because you can write robot movement with it and web pages you can't beat that.  If C# is faster it is because the language forces you to write code which makes the CLR work easier because most VB code I have seen will take a long time to clean up in C#.  Collections are objects you have to cast it to the type you need to use it in C# but in VB you just use it so if you get a database appilcation in VB to convert to C# you have long sleepless nights a head. 
    Friday, June 10, 2005 9:32 AM
  • User1025213086 posted
    It's folly to ask which language is the best, since each language has its own rules and syntax that appeal to different people. To determine what language is best is to determine which language you find best for you. If you think VB is slower, but prefer it over C# then that doesn't mean that you should switch to C# just because some people think its 'slower'. I've seen most people use C# because its more closely related to Java or C++, and would be understandable by those people who program primarily in those langauges. That's probably why alot of people translate stuff from VB because even Java people will be able to understand it (most of it anyway).

    Also, C# is shorter when it comes to writing code by hand (without using an IDE) since VB has alot more of grammatical wording that are required to conform to the syntax. Such as
    Dim blah As String when compared to C# is only
    string blah;
    But these shorthand conventions impede a bit on a novice's understanding of the code.

    Also, I don't think VB programmers are destined to death since VB has already a large programmer base, and many older projects are in VB, more and more older VB6 projects are being converted to VB.NET. Add since all that code is already VB, it'd be stupid to convert it to C# just because more people use it. If it works as it is, I say, leave it as it is!
    Also C++ I dont think is gonna die either, since it was the main language used to make Windows, with Microsoft releasing the C++/CLI standard to supercede the Managed C++ standard, I think that C++ still has a long way to go before anyone declares it obsolete.
    Tuesday, June 14, 2005 4:12 AM
  • User-1630302068 posted
    Also C++ I dont think is gonna die either, since it was the main language used to make Windows, with Microsoft releasing the C++/CLI standard to supercede the Managed C++ standard, I think that C++ still has a long way to go before anyone declares it obsolete.
      This is not to say that there arent a lot of people who would like to see C++ die a quick agonizing death. C++ has a lot of problems.
    Tuesday, June 14, 2005 7:24 AM
  • User1025213086 posted
    Yeah, alot of problems in the eyes of programmers who do not like the conventions used in C++, when compared to C# for example. C# simplifies alot of things to C++, but there are only 'problems' when people do not like the features used in C++. People do not like MI in C++ for example, but the people who complain about it don't have to use it, its just there for people who might really need it.
    Wednesday, June 15, 2005 1:14 AM
  • User-1630302068 posted
    My main problem with C++ is that the standard promotes bad habits.  The most glaring example of this is the stream libraries.  They overload the bitwise shift operators to do something completly un-intuitive.  Java does not support operator overloading because so many of the authors ran into badly overloaded operators in C++.  I have heard, though i do not personally know, that exceptions in C++ have major issues.
    Wednesday, June 15, 2005 7:24 AM
  • User1025213086 posted
    Your statement would be correct, C++ has some issues with exceptions, but they're not really bad. Using an exception handler without unwinding general semantics in the VC++.NET 2003 compiler spews out a whole lot of warnings sourced from the iosream and stdexcept libraries, since the standard library does overload alot of operators for most of its member functions, especially when handling strings. The compiler (or most C++ compilers rather) generate instructions based on assumption when they encounter ambiguity and exceptions in C++ would fall into that category. However, using /EHsc and /GX- on the VC 2003 compiler "fixes" most of this, that is, they get rid of the warnings.
    I've encountered some minor *cough issues with EH in C++, but to me, its no biggie if I'm not solely using the std library. C++/CLI is my theatre now.
    Thursday, June 16, 2005 5:48 AM
  • User-1793822101 posted

    Like others said, there is no such thing.

    Better to ask yourself:

    1. What language/s do I feel at home in?
    2. What work do I do?
    3. What languages have a great development environment?
    4. What languages will survive?
    5. If somebody else maintains my code, what languages are they likley to know?

    In other words, make your own decision after you've done some work on the issue!

    Sunday, July 10, 2005 6:40 PM