

InterviewSolution
Saved Bookmarks
1. |
Solve : What is a language and what isn't?? |
Answer» I have a very good question. Is Visual Basic a REAL programing language? I got into a little fight over this and I really want to know. Yes you can write "ok" applications in it, but to me it's just a man's way of being lazy. There is a big difference from using a Line tool in vb to draw a line or writting script that will draw it in C. One way takes 2 or 3 clicks and the other way takes some words to type. What do you think? Quote from: HelpDude88 on July 11, 2011, 08:34:45 PM I have a very good question. Is Visual Basic a REAL programing language?Yes. Quote Yes you can write "ok" applications in itPlenty of applications are written in Visual Basic. For a while, many of Microsofts own free tools- it's older Windows Antispyware program, for example- were written in VB6. Quote but to me it's just a man's way of being lazy.No, it's a way of avoiding typing out the same boilerplate code over and over. Quote There is a big difference from using a Line tool in vb to draw a line or writting script that will draw it in C. A: it's a Line "Control", and nobody beyond the beginner level uses either Shape or Line controls for MUCH more than basic decoration (that is, they aren't used for interactive elements). B:) C is not a scripting language. And yes, there definitely is a big difference between using the line tool in VB and writing it in C; the C version would be at least 5 pages long (remember, you need all the boilerplate stuff, including Registering the Window classes and creating the windows and managing the returned HINSTANCE and HWND from those functions, and hooking up the Window procedure and responding to the appropriate events (in this CASE WM_PAINT) using BeginPaint() to get a usable Device Context to draw to, drawing onto that DC using MoveToEx() and LineTo() and then calling EndPaint(), and then running it and making sure it works. Whereas with VB6 you simply put the control on a form. The only programmers or people that are opposed to this type of simplicity are the elitists who think that even basic programming should be hard. And as far as I'm concerned they can go straight to *censored*. There is no reason programming should be hard, and even less reason to make otherwise simple tasks needlessly complicated. Quote One way takes 2 or 3 clicks and the other way takes some words to type. What do you think?The thing is, you can do the "C way" just fine in VB6, by handling the paint event of the form or picturebox. You could, if you wanted to, simply have the program start in a "Sub Main()" routine and use the Windows API to register a window class (or possibly just use the existing "ThunderForm" class that VB6 and earlier would use) and create windows, and handle their message pumps and whatnot. But that is pointless since VB6 already deals with that. It makes 98% of what you need to do (or what usually needed to be done in 1998) easy; the remaining 2% is a huge pain in the *censored*. (Implementing IEnumVariant, for example). If you are in fact referring to VB.NET, there is no Line control. VB.NET is pretty much equivalent to C# in ability. Of course they both use that "Evil framework" that some people look on with chagrin, apparently because they think people should have to roll their own queue's and stacks and other crap every time they need one, which is nonsense. (and, with earlier versions of Visual Basic, you would have to roll your own stack's, queues, LinkedLists, Trees, and other structures- and Sorting routines (and yet the C standard library comes with qsort...)BC, he swats to win an argument. Noways nobody ever reads anything. Unless its in Twitter or Facebook. Many years ago, men and women who needed to program computers read real books and went to real classes. The was an ACADEMIC definition of a programming language. The ability to draw lines was never a principal criteria. But the ability to control a machine to produces something that had a great deal of complex order was a meaningful objective. This quote is a general and fair definition. Quote Programming language No suggestion that any computer dialect is disqualified, because it is not presently used to write real-time war games, was given in the article quoted.. Also, arguing about what computer programming language is best is the equivalent of engineers who want to build a bridge arguing about the brand of paper to get their blueprints on. And no, programming languages are not analogous to different tools, like screwdrivers and hammers. Computer Programming languages all have a single goal; to tell the computer what to do. It's the equivalent of arguing what Human language is best; in that case, C would pretty much be the equivalent of English. However just because English has become the "dominant" language overall doesn't mean it is the best; just as C being one of the most widely used doesn't make it the best (on account of it not actually being the most widely used; the programming language with the most lines of code written is supposedly Visual Basic, which passed COBOL sometime in the late 90's. ) For the most part, the arguments I hear constantly for "Visual Basic is not a language" all stem from a complete, pig-headed refusal to actually understand what it entails to create a non-trivial program in Visual Basic. the "Visual" part is purely for the GUI elements. Try writing a piece of code to display the right-click context menu and it will be longer in VB6 than the equivalent C code to do the same thing.To the OP. Tell you antagonist that there was an old Geek from the Old School wo says that real men do not ever use languages. The sit in front of a panel with lights and twitches. No display. No keyboard. Just lights and switches. And a wire-wrap tool. And a box of spare relays, circa 1959. |
|