r/learnprogramming • u/everyoneisgonnadie00 • May 21 '20
Topic Why isn’t Visual Basic more popular than C++/Python even though VB can create GUI apps more easily?
And should we study Visual Basic in 2020?
3
u/unassuming_user_name May 21 '20
visual basic had a long run where it was very popular, in the 90s and early 2000s.
the form building functionality is still in visual studio, its more commonly used with c# these days. you might check out Tim Corey on youtube, he does a lot of c# content.
2
u/HashDefTrueFalse May 21 '20
Probably because creating Windows GUIs in Visual C# is just as easy. Same set of widgets, events, Dev flow IIRC. Think it was the same for Visual C++ too.
So between them, you had high or (relatively) low level langs that we're about as easy to create a Windows GUI in, and people generally like the syntax of those better (C-like), so why would anyone use VB?
On the other hand, one of my old jobs had a legacy VB codebase and there was only one guy who was willing to work on it. Job security!
2
u/zandr0id May 21 '20
There's usually an inverse relationship in how "easy" it is to make something and how functional it actually is. The way things are made "easy" is by removing or hiding things that the user could potentially break. So while VB might make GUIs "easy", they're probably much less functional and the programmer is highly limited in what they can do.
1
u/11b403a7 May 21 '20
Well first off, because not many people use it professionally there is a lack of libraries and modules. It's not exactly fair to compare C++ to much of anything else other than maybe C. C++ has a bunch of other features and that make it perfect for certain types of development. Things like memory management, for instance.
Typically VB is used by people who don't know good programming practices. Then someone who does have to come in and fix. This is why a lot of devs don't like it.
Python isn't as far as I know, user in GUI development professionally but I could be wrong. Most python developers I know are data science. In fact, I don't think our company uses python anywhere else.
1
1
u/POGtastic May 21 '20
I hate its syntax. That's really all there is to it. Some languages are fun to use, others are meh, and VB pisses me off.
Should we study VB in 2020?
If you're using VBA, which is still the best way to work programmatically with Microsoft Office applications, sure.
If you're just writing VB, most people will argue that you should switch to C#.
1
u/ExtraFig6 May 21 '20 edited May 21 '20
Gtk and qt both have visual UI creators that can be used with C++ and python.
Because of web and mobile, the visual basic–style GUI apps is more niche than it was in the 90s–early 00s.
If you use .Net or want to write macros for Microsoft Office you should study visual basic. However vb.net is basically a skin for C#. If you know one you just need to learn some translation rules and then you know the other (I may be missing a nuance here. I haven't written for .Net since I was starting programming as a kiddo)
Here's the official link to the Qt gui designers https://www.qt.io/product/ui-design-tools
And for gtk, there's glade https://glade.gnome.org/
I think the huge variety in screen size and input (mouse? Multitouch? Gamepad) means the classical dragging and dropping widgets to their absolute location doesn't scale well. Instead, the UI needs to be definited in a way it can adapt to the screen size https://en.m.wikipedia.org/wiki/Responsive_web_design
1
u/throwawayHiddenUnknw May 21 '20
Lot of dll file dependencies and only supported for windows. Also too much event based programming and lacks centralised app management.
5
u/CowboyBoats May 21 '20
"It was created very easily" isn't necessarily one of the things someone looks for in a GUI.