Comparison between languages-VBForums
Results 1 to 9 of 9

Thread: Comparison between languages

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,082

    Comparison between languages

    Hi,

    This thread explains all the comparison, advantages/disadvantages of one particular language or framework over another particular language or framework. Here are the questions with answers I have included in the FAQ so far:

    What is the difference between Visual Basic 6.0 and Visual Basic .NET?
    What is the difference between Visual Studios and Visual Basic?
    How many different versions of the languages or Visual Studios are there?
    Why is C# better than Visual Basic.NET?
    Visual Basic.Net from a historical point of view (looking back on VB in the past)
    Why is Visual Basic.NET better than C#?
    Advantages/Disadvantages of using C#


    Nightwalker
    Last edited by Nightwalker83; May 2nd, 2011 at 05:59 PM. Reason: Adding more!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  2. #2

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,082

    Re: Comparison between languages

    What is the difference between Visual Basic 6.0 and Visual Basic .NET?

    There are quite a few differences in VB6 and VB.NET. We will highlight some of these here in points:
    • The greatest change in VB6 and VB.NET is of runtime environment. VB6 used the VB-Runtime while VB.NET uses the .Net Common Language Runtime (.Net CLR). The CLR is much better designed and implemented than VB-Runtime. The CLR uses better code translation through Just in Time compiler while VB-Runtime interprets the code. The CLR Garbage Collector is also more efficient than VB6 one as it may detect cyclic references too.
    • VB6 was interpreter based language while VB.NET is a compiled language
    • VB6 was not a type-safe language while VB.NET is a type safe language. There is no variant type in VB.NET and no magical type conversions happen in VB.NET
    • VB6 used ‘On Error Goto’ syntax to handle exceptions at runtime. VB.NET uses the Try…Catch…Finally syntax to handle exceptions at runtime.
    • A lot of code (like user interface code) in VB6 was hidden from developer. In VB.NET no code is hidden from developer and you can access and control each part of your application
    • VB.NET has much enhanced object oriented support than VB6
    • VB6 does not allow developing the multithreaded applications. In VB.NET you can create multithreaded applications.
    • VB6 was only considered good for desktop windows application. In VB.NET you can also develop web applications, distributed applications, create .NET windows and web controls and components, write windows and web services.
    • In VB.NET, you can also use reflections to read the meta-data of types and using reflection emit you can also generate code to define and invoke types at runtime.
    • VB.NET uses .NET framwork class library along with specialized VB library (System.VisualBasic) as a standard library. As a result, the standard library for VB.NET is much enhanced and useful compared to VB6 standard library
    • VB.NET is platform independent because of .Net framework. Programs written in VB.NET can run on any platform where .Net framework is present. The platform include both hardware and software (operating system) platforms.
    • VB.NET also supports language interoperability with various .NET compliant languages. This means that you can use and enhance the code written in other .NET compliant languages. Similarly the code written in VB.NET can also be used and enhanced by other .NET compliant languages. Although VB6 also provided this functionality through COM but it was limited and difficult to use and manage. VB.Net makes it easier because of the presence of Intermediate Language (IL) and Common Language Specification (CLS) of the .NET architecture.
    • VB6 uses COM (Component Object Model) as component architecture. VB.NET uses assemblies as its component architecture. The Assemblies architecture has removed a lot of problems with COM including DLL-Hell and versioning problem.
    • Components created in VB6 (COM) need to make and update registry entries. VB.NET does not require any registry entry making the deployment easier
    • VB6 used ASP to build web applications. VB.NET uses ASP.NET to build web applications.
    • VB6 used ADODB and record-sets to implement data access applications. VB.NET uses ADO.NET and datasets to build data access applications. The ADO.NET also supports the disconnected data access.
    Borrowed from: http://www.programmersheaven.com/2/F...ET-Differences



    What is the difference between Visual Studios and Visual Basic?

    Quote Originally Posted by jmcilhinney View Post
    Visual Basic is both an IDE and a programming language. Visual Studio is the Microsoft IDE for .NET programming and more. There are various components to Visual Studio, each designed for development using a specific language or technology. The Visual Basic component is an IDE for Windows development with the Visual Basic language. The Visual C# component is an IDE for Windows development using the C# language. The Visual C++ component is for Windows development using the C++ language, which includes both unmanaged (non-.NET) C++ and C++/CLI (.NET). The Visual Web Developer component is for web development using the Visual Basic and C# languages and the ASP.NET technology.

    The four components mentioned above also come in free, standalone Express editions. Apart from that, Visual Studio also supports components from Microsoft for SQL Server development (up to VS 2008 so far), Windows Phone 7, F# and XNA. Visual Studio is also extensible, allowing third-parties to create components that plug-in and support other languages and technologies.

    If you are interested in learning VB development then you should start by downloading and installing VB Express and, if you want to learn web development, VWD Express.

    http://www.microsoft.com/express/
    How many different versions of the languages or Visual Studios are there?

    See the Microsoft Visual Studios wiki page:

    http://en.wikipedia.org/wiki/Microsoft_Visual_Studio

    Why is C# better than Visual Basic.NET?

    Quote Originally Posted by DeanMc View Post
    This article is intended to help people facing the C# or VB debate that is raging over the internet. You will notice that there are no code examples, no side by side comparisons and most importantly there are no lengthy paragraphs. Essentially what you have here is a genuine article devoid of all the useless nonsense that permeate other articles of this nature.

    First let me start with the most asked questions. Bear in mind that these are my views and that they are based on using code for production not academics. This is because I'm sure you eventually want to make money out of programming and academic coding is wildly different to production coding.

    Which is the most powerful:
    Technically C# is the most powerful simply because it allows the use of unmanaged code. While many people will argue that VB has, for instance the MY namespace many of VB specific features tend to be wrappers to make certain tasks easier. This means, while C# does not have the MY namespace it can still achieve all of its functionality. If VB gained the ability to use unmanaged code it would be functionally as powerful as C#.

    Is C# safer than VB:
    No, option strict and explicit exist to allow the language to be more flexible, if they are used incorrectly this is not the languages fault. Using option Strict/Explicit is analogous to using pointers in C#. Academically they should be avoided but production code sometimes requires a less than perfect approach to coding for a number of reasons.

    Which is easiest to read:
    This again is subjective. C# is written in a "C" style format. Visual Basic on the other hand is written in a pseudo-English style format. Which is "better" is a case of personal choice. Some people argue C# is overtly complex because of its heavy use of symbols, while many argue that VB is simply too verbose and that complex equations become hard to read. The only way to find out which one you like is to try both first hand.

    Which pays the most:
    At the time of writing C# pays the most. This is because of economics rather than language features. While C# does pay more it is not a huge amount more and could change drastically in the future. Do not let this be the deciding factor as economics is beyond your control and a good programmer will always find properly paid work regardless of current trends.


    So that's the most popular questions out of the way now its time to get down to brass tacks. Which language should you code in and why. Well the answer is both. Yes you should know C# just as well as you know VB. The fact of the matter is both of these languages target the same framework. You will have twice as many job prospects by knowing the two main dot net languages rather than just one. It will also help you to understand the framework better because sometimes there are slight differences in how you utilise the framework in each language.

    Obviously you should not try to learn both languages at the same time. Using your first choice learn how to program for windows, the web and database programming. Never throw out any of your written programs, now matter how trivial, when you are comfortable with writhing programs in your first language move to the second. The best way of doing this is to convert your old programs by hand. You may find you actually enjoy using the second language more than the first but always try to keep programming in both this will leave the door open for many more jobs and allow you to leverage each languages strong points within an application.

    Hopefully this article helps you out. Remember many articles out there of this nature are simply blowing hot are around. They argue about keyword names and curly braces. Do not even bother reading a different article. The best thing you can do now, if you want to become a successful programmer is to open up your chosen editor and start programming in your chosen language, because wasting your time arguing over languages and abstract features means your coding less, which ultimately means your not making as much money as you could. Or if your into open source: Shine on you crazy diamond!
    Another of the about type of discussions:
    http://www.vbforums.com/showthread.php?p=3521166
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  3. #3

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,082

    Re: Comparison between languages

    Why is Visual Basic.NET better than C#?

    Top 10 reasons VB.NET is better than C#

    Advantages/Disadvantages of using C#
    Taken from here

    PROS:
    • For many, C# has a familiar syntax in that it follows C.
    • Fully integrated with the .NET library, providing access to a great repository of functionality and support.
    • Safer than its namesakes (C/++) in that pointer types are not permitted.
    • .NET Library - ever expanding, lots of predetermined classes.
    • It's like java and c++ combined, and that makes it a very powerful language, and since I know both of those two language I find it very easy to create applications. Also the .net library is really good.
    • the just in time compiling method is great, saves time and beats a virtual machine.
    • It is easy to remember syntax.
    • The garbage collector saves you the trouble of freeing memory
    • Java's step child, near identical to Java, but with benefit of experience
    • Delegates - offer a clean event model and more elegant code
    • Events - can't be stressed enough, good clean model (VB.NET version, not so much)
    • Properties - more explicit than classic OOP getter/setter methods
    • No multiple inheritance
    • Microsoft Driven


    Cons:
    • Obviously less efficient in execution than C/++ because it is ultimately interpreted.
    • Still allows pointers in 'unsafe' blocks.
    • Loses any cross-platform capabilities because of the integration with .NET.
    • No multiple inheritance (although there is a work around).
    • Doesn't compile as fast as it's predecessor c++
    • Microsoft Driven
    • Can't really do non Windows: Sorry, Mono tries, but...


    Visual Basic.Net from a historical point of view (looking back on VB in the past)

    Quote Originally Posted by jmcilhinney View Post
    VB was pretty much designed as a programming language for non-programmers. As a result, while a good developer can write very good VB code, it's also very possible for a bad programmer to write very bad VB code that will still work. It's possible to write bad code in any language but, because VB is so forgiving, it's far easier to make a program work with bad code and little real understanding in VB than many other languages. VB got a bad rep for two main reasons, one mostly deserved and one not so:

    1. Far too many VB developers didn't take enough pride in their work to develop a genuine understanding of what they were doing. VB made it much easier to take a "path of least resistance" approach, and many people did. Many developers from other languages were right to disrespect people who wrote bad code because VB let them. Unfortunately, that disrespect tended to be directed and those VB developers who did take pride in their work too.

    2. VB made programming easy. Many developers, those from C/C++ particularly, wanted programming to remain an exclusive club. If any idiot could program, that made them less special. Because VB was like using Duplo blocks (little kids Lego) compared to using Mechano in C/C++, VB developers were considered a lesser species of developer, even if some of them would have been smarter people than those looking down on them.

    VB.NET does continue the tradition of making programming easier for the beginner than many other languages. That said, it has inherited its bad name from VB6. If VB6 and earlier versions had never existed, no one would have an issue with VB.NET. Just live with it and laugh at them while you relax for a few weeks after completing your application while they continue to struggle with theirs that doesn't look as good or do as much.
    Last edited by Nightwalker83; May 2nd, 2011 at 05:58 PM. Reason: Fixed section title!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  4. #4
    PowerPoster
    Join Date
    May 2002
    Posts
    25,459

    Re: Comparison between languages

    Since you went this way:
    Why is C# better than Visual Basic.NET?
    and
    What is wrong with Visual Basic.Net?

    you really should go the other way:
    Why is Visual Basic.NET better than C#?
    and
    What is wrong with C#?


    Also... I wouldn't call what JMC posted there in your quote as "what's wrong" with VB... it's more of a historical perspective on "Why there's this negative perception of VB." Inherently there is nothing wrong with VB. Well, there are a few "features" of VB I'd like to see gone, but that's related to what's really wrong and that is: people abusing the language. and that goes to point 1 in jmc's posting.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,082

    Re: Comparison between languages

    Quote Originally Posted by techgnome View Post
    Also... I wouldn't call what JMC posted there in your quote as "what's wrong" with VB... it's more of a historical perspective on "Why there's this negative perception of VB." Inherently there is nothing wrong with VB. Well, there are a few "features" of VB I'd like to see gone, but that's related to what's really wrong and that is: people abusing the language. and that goes to point 1 in jmc's posting.
    Fixed! I also, added just some of the information on why VB.NET is better than C#. Although, I will probably add more links to external arguments later on.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  6. #6
    Loquacious User Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    24,281

    Re: Comparison between languages

    From a purely mechanical perspective, VB also has the great benefit that it is easier on your hands....assuming that you can type, which is an assumption is becoming increasingly safe as computers dominate the landscape. Any typing course will teach you to keep your fingers on the 'home row'. VB makes much greater use of the characters, while C-style languages make much more use of symbols. Symbols are all located as Shift+something (except a few, I suppose), and that something is often found on either the top row, or around the perimeter of the keyboard. For a fast typist, those characters act like speed bumps. We may be stuck with the QWERTY layout to our keyboards, but why exacerbate the problem by using a language that requires hand-stretches to accomplish anything?

    Another point I would make is that the C language was developed several decades back, and it shows. At the time that C was developed, there wasn't enough reserve computing power to allow for case-insensitive coding. What VB does, with correcting casing on the fly, was a luxury that was readily ignored when C was new. That legacy is with us still, though it is a pretty poor legacy. After all, no competent programmer would write code that used two variables that differed only in their case. That would be a maintenance nightmare. So why are C-style languages still case sensitive?

    A similar issue related to that is the semicolon. C-style languages used the semicolon to indicate where the lines ended. That made a modest amount of sense at a time where computational power was at a premium. However, it was ultimately a mistake. What early VB did was use a line continuation character. Therefore, in VB, you had to actively indicate that the line continued to the next line of code, whereas in C, you had to actively indicate when the line ended at the end of the line. I don't know a single C coder who has not spent significant time dealing with a bug that resulted from leaving off a semicolon, whereas I know few VB coders who ever used the line continuation character at all. Furthermore, if they did use the continuation character, they were taking an active step to indicate an unusual situation rather than having an unusual situation arise by an oversight. Worse yet, the more recent VB.NET compilers don't even require the continuation character at all. It is never necessary to indicate the end of a line, since modern compilers are smart enough to figure it out on the fly, but that advantage hasn't made it to C-style languages yet, where the absence of semicolons is still causing hair loss to this day. Fortunately, the semicolon is one of the easiest symbols to type.
    My usual boring signature: Nothing

  7. #7

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,082

    Re: Comparison between languages

    More VB6/.NET comparison information can be found here.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  8. #8
    PowerPoster
    Join Date
    May 2002
    Posts
    25,459

    Re: Comparison between languages

    Sweet! resurrecting an old post to link to a post 4, almost 5 years out of date. :P I do believe we have arrived.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  9. #9

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,082

    Re: Comparison between languages

    Quote Originally Posted by techgnome View Post
    Sweet! resurrecting an old post to link to a post 4, almost 5 years out of date. :P I do believe we have arrived.

    -tg
    I am not entirely sure what you mean but that? However, since VB6 itself is out of date I guess it doesn't matter. I posted the link here after another for member asked about comparisons between how fast VB.NET and VB6 were at preforming the same functions.
    Last edited by Nightwalker83; Sep 10th, 2011 at 10:10 PM.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.