Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pros and Cons of VB & VBA?

Tags:

On another programming related website, I saw this line in someone's signature. This is NOT the first time I've seen such sentiments, although this is the harshest:

"People who work in VB or any variant thereof are not programmers, they are circus chimps throwing feces into an IDE..."

VBA is my bread and butter and I can automate quite a bit of stuff with it. Yes, I know it lacks polish and some functionality, but why so much negativity toward it? On the flip side, what do other languages have that VB doesn't?

like image 403
PowerUser Avatar asked Aug 28 '09 19:08

PowerUser


People also ask

What are the disadvantages of visual programming?

The disadvantage of visual programming languages:These languages require computers with more memory, high storage capacity of hard disk, and faster processor. These languages can only be implemented on graphical operating systems like Linux and windows. The execution speed of visual applications is slow.

What are the disadvantages of Basic programming language?

The bugs can get annoying and they are hard to solve sometimes, If you are not good at math then it will not easy to program, Lots of thinking is involved, If you don't have a good memory, then it will be hard to memorize the syntax of the programming language.


1 Answers

VB6, VBScript, and VBA have the reputation because they just aren't industrial strength languages. Notably:

  • No OOP. Sure, you have classes and modules, but no inheritance. VB isn't a low-level language, it needs real objects.
  • No first-class functions, so you can't even simulate OOP or polymorphism.
  • Lack of a well-developed class library. VB6 has a small library of built-in functions, and almost all other functionality is delegated to Windows calls or (usually pricey) third-party components.
  • Lousy error-handling. ON ERROR RESUME NEXT is a pox on the planet.
  • Although its not the fault of the language, VBA earned a bad reputation by association with MSAccess.

Of course, VB wasn't really intended to be an industrial strength language, so maybe nothing mentioned above is really proper criticism of the language at all. Fortunately VB.NET and the latest versions of VBA fix everything above, so VB.NET is on par with any other "serious" language in the marketplace.


[anecdote]

In defense of VB, I find most people criticize the language just to go along with the status quo, not because they've actually used it.

A few years ago, in a chatroom, I ran across young neophyte railing against a VB6 developer for using such a crappy language. I innocently asked "what's wrong with VB".

The first thing he said was "Because its a WINDOWS language!" So I pointed out that Borland Delphi is a Windows only language*, but I've never heard anyone malign it for that reason. (* There was a product called Kylix which cross-compiles to Linux, but its expensive, buggy, and discontinued. Its been a while since I've used Delphi, but last I'd heard, its still not ready for Linux.)

So, he said "It has a HORRIBLE SYNTAX!" Is that really the reason people hate this language? I'd say Perl, Lisp, and C++ are worse on the eyes than VB.

Next, he says "Its too easy to learn!" Well, I'd consider that a point in favor of the language. I'll never write a GUI by hand if I have a drag-and-drop designer at my disposal. What else you got?

So finally, grasping at straws, he comments "It has... no string manipulation functions". Left, Right, Mid, Replace, InStr and Trim. QED noob.

Interestingly, VB has features found some "hacker" languages, namely variant datatypes and duck typing. Compiled code performed reasonably well, interop between COM and native windows DLLs was easy, and the GUI editor basically set the bar for all future RAD development.

[/anecdote]

like image 69
Juliet Avatar answered Oct 01 '22 16:10

Juliet