🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Why not VB is the question you should be asking

Started by
36 comments, last by Spaghetti 23 years, 10 months ago
quote: Original post by Muzzafarath

>> Anyway, VB loads about a million DLLs <<

Same thing goes for using the Windows API in C++. It loads about a million DLLs too


VB programs need and will always need more dlls then vc++ ones do, and presently at least, not standart ones unlike those of C++.
Most of the programs that come with your windows package were written in c/c++, thus it is a standart...
AquDev - It is what it is.
Advertisement
You always may made a visual basic program and next translate to c++ (in the optimization phase).


-eng3d.softhome.net-
-----------------------------------------------"Cuando se es peon, la unica salida es la revolución"
quote:
VB programs need and will always need more dlls then vc++ ones do, and presently at least, not standart ones unlike those of C++.
Most of the programs that come with your windows package were written in c/c++, thus it is a standart...


Yes, VB will (at its current state) always load more DLLs than a Windows program written in C++, but still... And so what if most of the programs are written in C/C++?

quote:
You always may made a visual basic program and next translate to c++ (in the optimization phase).


Well... yeah, but if you''re going to translate it to C++ anyway why bother writing it in VB at all?
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
First of all I am a C/C++ (game)programmer and prefer to program in this language, but I also program in VB. I have for a long time (since I first found C/C++) considered VB to be extremely slow and bulky, but I have been thinking about it recently and in regards to game programming I am beginning to have thoughts regarding VB and Direct X. Now as far as I know a game made with using Direct X uses the DLL''s to communicate with the hardware directly. Now considering that in creating a DX app in VB, you wouldn''t have to use many extra controls, the main way the program would run would be via the DX interface. And as far as I understand this interface is the same one used in C/C++ as you do not use differant DLL''s when using VB.
For those of you who haven''t yet *tried* running any of the VB examples that come with DX7 I suggest you do before jumping to conclusions. I also believe that the VB Direct X includes all the functions (or at least functionality)accessable in the C/C++ version.
The VB examples run significantly slower and are more bloated. Also, the VB examples aren''t even as complex, and optimization is not the same in VB as C++, more options in C++.

-----------------------------

A wise man once said "A person with half a clue is more dangerous than a person with or without one."
-----------------------------A wise man once said "A person with half a clue is more dangerous than a person with or without one."The Micro$haft BSOD T-Shirt
The next version of VB, built on .NET, is supposedly exactly the same speed as C# (which is about 10% slower than current compiled C++). It still loads millions of DLLs, they are just more transparent to the user (C# uses the same DLLs). The next version of VB also supports the same feature set as C#, so VB users can now use inheritance, polymorphism, operator overloading, and a few others. Of course, since it has exactly the same feature set as C#, it's not fair to say that it's any easier to use. The BASIC syntax may be slightly more intuitive than C#, but that really only affects the learning curve (slightly). VB, as always, is better for RAD (rapid application development) apps using the Windows GUI because it does a lot of stuff for you. Of course, you could argue the same of MFC. Both come at a performance hit.

Note that I've been comparing VB with C#. Saying that VB (in it's persent version, or ANY language based on .NET) will ever be faster than well-written, natively compiled C++ code is a ridiculous statement that only demonstrates your own ignorance. In fact, you'd have to spend months optimizing VB code to get the same performance level as sloppy C++ code. In that sense, you could say that, where speed and efficiency is important, C++ is actually a -faster- language for development than VB.

There are two basic arguments for the use of VB, and both are no longer relevant. The first is ease of use. However, the BASIC syntax is only slightly more intuitive than C++, and far more bloated. The next version of VB includes basically all of the features of C#, which in turn has inherited almost all of the features of C++. As VB gains these new features, it loses the ease of use that once made it so popular. "But", you might say, "Nobody is forcing you to use these advanced features!". Bingo! Nobody is forcing you to use them in C++, either.

The second argument in favor of VB is that it reduces development time. First, this applies only to Windows GUI development. VB has nothing to reduce development time in the slightest for applications that do not use the Windows GUI (i.e., games). As far as GUI development is concerned, C++ has MFC, which - combined with VC++'s IDE - is an order of magnitude more powerful than VB, much faster, and reduces development time just as much. The truth is, C++ is actually much faster for developing applications that don't use the Windows GUI, because while VB was designed for those types of applications, C++ was designed to be much more flexible, and so easily expands into other areas.

But maybe I'm wasting my time arguing with somebody who obviously doesn't know the first thing about what he's talking about.

-RWarden (roberte@maui.net)

Edited by - RWarden on August 21, 2000 10:15:24 PM
As a C++ programmer by night and a Visual Basic programmer by day, I would argue that the BASIC syntax is a -lot- easier to learn and read. The main part of this, is that it doesn''t use so much punctuation and special characters! Count the number of ''*'' on an average screen of source code written in C, or even C++, to see what I mean. -Especially- char* string manipulation routines. It is also easier to spot an ''end if'' and distinguish it from an ''end while'', than to play ''match the brace''. Even when you factor the STL into things, Visual Basic is still much ''nicer'' looking. Compare writing a function object in order to use for_each, to the simpler for...each syntax in Basic. Or, Basic''s ''with'' statement.

Of course, these features make it more -difficult- for me, as an experienced programmer, as I don''t want the clutter of redundant words (such as the ''then'' in an if...then statement). The parts of BASIC that make it more intuitive to learn and read to a beginner hamper me as an advanced user as they get in the way.

As for Rapid Application Development... well, MFC really is not very good. At least in Visual Basic you can drag and drop things in place and they work. MFC requires all kind of obscure patching up behind the scenes to get things to work, not to mention some components (in VC5, at least) only work if you ''cheat'' by putting a placeholder in their position and swapping them around at runtime. Combo boxes on toolbars were one example from the past, I believe. Of course, all this is the price you pay for flexibility, but the simple fact is, even a moron can get a few nice forms and buttons in Access in no time, but they could take days or weeks to do the same in MFC. Development time is not just how long it takes a skilled programmer to achieve a task, it''s how long it takes a naive programmer to learn the task. And with C++, that''s almost always longer.

This is why I like Borland C++ Builder as it really does bridge the gap, allowing very quick development with nearly all the power of C++ linking the components together. I would still argue that it is not as suitable for a new programmer as Visual Basic, however.
Leave beginners and the learning curve out of this discussion . I''m comparing an experienced VB programmer on VB with an experienced C++ programmer on C++. Once you know what you''re doing, one language offers no real benefits in development time than the other. As for comparing the syntax, BASIC syntax isn''t really easier - you follow exactly the same rules, they just have a more English-like syntax. It''s not ''easier'' to declare a variable in VB than in C++, one simply looks a bit more like normal English. Again, limit the discussion to experienced programmers. And, like you said yourself, BASIC''s redundant words only get in the way. Plus, BASIC keywords are generally longer than C++ keywords, meaning lots of typos. I won''t start on MFC, I''ll just say that if you''re doing anything more than the most absolute basic UI, MFC will be easier than VB because - frankly - it''s easier to hack.

-RWarden (roberte@maui.net)
I made a artificial life program which runs in vb. The program is great when you are in a time crunch. It is a bit slow, but I have noticed that the newer and ner releases are getting faster and faster. And now with support for DirectX in Vb is only your taste in choice of what language you code in.
If you would like to see my alife program you can download it here
www.geocities.com/wavewash/clv1.4.zip
the web site for the program is here
www.geocities.com/wavewash

If you do download the program, notice how when you have a lot of food and ameobas in the program, the program slows down severely, but I think it would do the same even if it was programmed in C++.

I have started to program Direct3d in C++ now and find that though it is hard to program. The versatility is great.

~Wave
Because it''s slow and big and oh yeah, VB sucks.

This topic is closed to new replies.

Advertisement