Search This Blog

Sunday, June 14, 2009

Why still use VB6

Well, that depends on who you ask that question to. If you ask that to a VB6 programmer, you'll hear all the good things about the language. If you ask it from someone who hates VB6 then you'll hear all the bad things this language has and might even insult the programmers using it.

So without getting personal on the answer, how should we answer this question and every other similar questions?

The answer is "objectively".

Yes, I know there are still so many programmers that behave like martial artists of a certain school --- always claiming their school and style is the best and theirs can beat anything else.

But take note also that other programming languages suffer the same insult and discrimination simply because of this mentality. So let's list some of the bad and good that VB6 has, and not make judgments based on personal preference.

So what's bad about VB6?

B01 - it's not fully OOP compliant.
-----------------------------------
I guess it's because VB6 was not intended for OOP in the first place.

B02 - it's not strict when it comes to declarations and indentations
-------------------------------------------------------------------
Okay, true. VB6 allows you to use variable "X" without declaring it.
You can also put more than one statement in one line and it would still work as long the statements are valid.

B03 - it's slow
--------------
Yep, if you want speed go use C/C++. If you want to write a game, you won't have the speed that other games developed in C++ has. If you want to talk to a hardware, this has limited set of APIs but they are just wrappers and therefore slower compared to direct hardware calls like in assembly.

B04 - it's no longer supported by MS
--------------------------------------
True. You got a problem with your VB6 code, search the internet for forums that discuss VB6 or ask your peers that use it.

B05 - Anything else I might have missed.
------------------------------------------
I don't have a full list so I probably failed to mention other reasons.


And what's good about VB6?

G01 - three letters : RAD
--------------------------
Maybe not right now, but it was on top of the RAD ("Rapid" Application Development) programming languages for a long time.
There wasn't any other language that can create an application that fast and that easy like VB6.

G02 - it's simple to understand
--------------------------------
It should be since it was modeled after the BASIC generations (BASIC, BASICA, GWBasic, QBasic and TurboBasic). Its keywords were one of the (if not the) simplest. To print something it has the "print" statement. You want to display a message box or prompt to a user, use "msgbox".

G03 - it does the job
----------------------
Not all but a lot of applications and systems are built using VB6. These applications are used by large companies for handling production activities and transactions. Writing a similar application in another language would take more time.

G04 - it had a lot of support from other developers
----------------------------------------------------
Back when it was VB3.0 it already had some cool controls that you can just paste onto the form and use like the drive, folder and file list boxes. Since then, a lot of developers created custom controls to be used for VB, some were written in C/C++.
To a developer, this was great news as more technologies are available for use.

Well, this is how I would answer the question and any other similar questions. For me, there is no perfect language. Every one of the programming languages have their own strengths and weaknesses. Honestly it's pointless to try and pin point the best language, if I had to choose then I'd pick C++. Why? Cause as old as it is, it's still being used and is highly regarded in the IT world when you want to get something done.
Not only that, a lot other programming languages were developed using C++ (please correct me if I'm wrong but I believe Java and Python are some of the great languages that came out from C++). But as magnificent as it is, it still has some cons. One is that it will take considerable length of time to create a simple GUI application using it. Java is also a great language but you'll still hear some criticisms about it.

To me, these are all tools. Tools available to any developer. Why waste time debating what's the best? Why not just use the best at the moment or the best for a task? And why not combine these tools to create a better application? Why not strenghten a language's weaknesses instead of criticizing them?

And to answer the blog question, I say "why not?"

No comments:

Post a Comment