Visual Basic

general programming support, from getting started, to releasing your first project.
User avatar
=UKE= Widow Maker
Newbie
Posts: 7
Joined: Fri Jan 03, 2003 9:29 pm

Postby =UKE= Widow Maker » Sat Jan 25, 2003 6:51 pm

How efficint is VB code? i have heard that a program written in VB will take much longer to do something than a program written in C++ or other is this right?

Red

User avatar
smurphster
Advanced Member
Posts: 149
Joined: Fri Jan 03, 2003 5:57 pm
Location: Wisconsin, USA
Contact:

Postby smurphster » Sat Jan 25, 2003 8:50 pm

I know a bit of VB but I'm mostly a C++ programmer. I'll try to answer your question as clearly as I can but mSparks (or someone else that knows VB) might have to throw in some extra information.

C++ is an extremely flexible language. You can use it for almost everything from games, to large databases, to applications. VB, however, isn't quite as flexible. It integrates well with Microsoft products and is more suitable for Windows applications (what you see on the screen).

In C++, you can use Object Oriented Programming (OOP, or OO), which can be a programmer's dream or nightmare. Programming without it is often more of a nightmare. OOP tends to make C++ programs very efficient. VB does have some OOP features but from what I understand, they aren't as efficient as OOP in C++ for most purposes.

So I guess to answer your question, yes and no. In general, C++ is more suitable than VB for a given program, but VB does have its advantages. The speed/efficiency really depends on what the program needs to do.

mSparks
Advanced Member
Posts: 997
Joined: Fri Jan 03, 2003 2:54 pm
Location: North West UK
Contact:

Postby mSparks » Sun Jan 26, 2003 1:22 am

VB as a language is good, what smurph said about flexibility is not entirely true. You can pretty much do anything in VB that you can in C (although the more advanced stuff in VB is actually more complicated than C).
VB provides a very quick time to produce a working program, whereas C is hard work from the start.
However VB is a scripting language. This means that the code you produce doesn't actually produce a 'working' executable. It interfaces with a DLL provided by microsoft that actually does the work. (similar to the way Javascript works in html pages)
C 'compilies' into actual assembly code, which run therefore run at much higher speed (since the machine needs todo much less work per command).
When I first started writing windows programs, I wrote the majority of 'alogorithm' code as a DLL written in C (for speed and size) then referenced that from a front end written in VB.
I then discovered the 'MFC exe project' in visual C++ 6 and haven't touched VB since.
© Mark 'mSparks' Parker 2010
<pubkey>AJXzWKeV59HaoUkmrCwP9f+kMr8aOIM
jMKy7ACsaRDCE/XuF0orj/jActtfWDMKjg/CixI7JP0Z6lbS99dc
86fxDIQOmfIU8BNYKPmlPA/uY3ZpT9/4iQY0XwKad5eJhDFW
cZ2Z4VUWJzlbuoX/QV4ihTVkr9JnyJb+fN9AOqXH9AQAB</pubkey>


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest