Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Perl versus VB

by juo (Curate)
on Jan 17, 2003 at 19:33 UTC ( #227771=perlquestion: print w/ replies, xml ) Need Help??
juo has asked for the wisdom of the Perl Monks concerning the following question:

I would like some feedback of some language experts about the advantages and dissadvantages between Perl/Tk and Visual Basic. Which language would you recommend and why. Please consider also that a GUI interface is important and the only good one in Perl I know is the Tk module. I already know a good advantage of Visual Basic : It is actively supported by most Microsoft Applications. Any other good advantage and dissadvantage of both. Thanks

Comment on Perl versus VB
Replies are listed 'Best First'.
Re: Perl versus VB
by chromatic (Archbishop) on Jan 17, 2003 at 19:51 UTC

    Visual Basic only runs on Windows. That disqualifies it for my purposes. (In my house right now, we have several Linux distributions -- Red Hat, Gentoo, Mandrake, Debian, Slackware, a couple of versions of Mac OS X on laptops, at least one Solaris box, and at least one OpenBSD machine.) I think only one of these machines has *ever* had any version of Windows on it, and that's long gone.

    I've also never worked with VB (VBScript yes, but I don't want to talk about that). I have used Perl to control Windows applications. That's reasonably easy and effective.

    Finally, armed with Mastering Perl/Tk, I've maintained and extended a GUI application with Perl and Tk. It looked fairly good and ran well. Other good toolkits are wxPerl and Perl-QT. I'm not sure how well-maintained the Gtk-Perl bindings are at the moment, but there are other cross-platform options besides Tk.

    To sum up, I know Perl, Perl runs on more platforms, Perl can work with COM and DCOM, and I've used Perl with Tk successfully.

Re: Perl versus VB
by MZSanford (Curate) on Jan 17, 2003 at 20:06 UTC

    I am no language expert, but here are some opinions :

    • About Tk
      • con: Look to clunky (big con for me)
      • pro: (relativly) Easy to extend on your own
      • pro: cross-platform
      • con: No support (aside from RTFM)
      • pro: you can review the code in lieu of support.
      • pro: free
      • pro: Access to other perl features (e.g. Modules)
      • con: Does not make executables nativly (tho, PerlApp can for a price)
    • About VB
      • pro: Native look
      • con: Lacks heavy lifting features
      • pro: Tech support
      • con: Tech support costs mucho dinero
      • con: program costs mucho dinero
      • con: No reviewing code if you hit a wall
      • pro: Creates executables, and installers

    But, the world is not so cut-and-dried-like-jerky (yum, jerky). I find that if i am not looking for cross-platform, Win32::GUI is quite nice (and you will recognize some of the functions from VB). I have also been told that wxWindows is good looking, stable, and cross-platform, but i have yet to play with it.

    Imagine your review going to the pointy-haired-one with words like "cross-platform", "new technology" and the like on it... gooood. This is not to say i do not us VB. I use it for client apps which don't need to do much aside form look good and get data from a (perl based) server somewhere.

    All views are opinion only. Nothing is fact. Nothing is real. This has been a dream ... a dream about two copper Lincolns debating the existance of this large guy who, like, caries them around in his huge pocket. That pocket is mine. These have been My Two Cents™

    from the frivolous to the serious
      • About Tk
      • con: No support (aside from RTFM)

      What's this site, chopped liver? If he's using it with Perl (and that's what he was asking about) he can get a lot of help right here!

      In general, Tk, like many open source solutions, tends to have much better real support than similar propietary products.

      With the latter, you pay a lot for "support" and what you get is a phone number you can call. When you do call, you often get to wait on hold for extended periods of time listening to crummy Muzak™. When you do get through to a person, you only get immediate help if your problem is simple because the first line of "tech support" knows what the product is called, how to ask whether your computer is plugged in and turned on, and not much else. After much explaining and re-explaining, you will finally be escalated to a person that knows something about their product versions and how to walk you through a re-install but not much else... And so on.

      The best support is almost always found in newsgroups, websites, mailing lists, and irc channels frequented by people that really use the product.

      "My two cents aren't worth a dime.";

        I did have a feeling i would get a reply similar to this. When I wrote this is did think about the online resources, but then i thought that those resources are available for both products, and are therefore not really that great from a compare/contrast perspective

        I agree you have a very long wait if you opt for the call Microsoft option ... not to say New Groups respond at the speed of a synapse (or that you will even get an answer .. anyone have that unaswered posts on Perlmonks stat handy (it's lower than one would expect, because this place rocks ... but it is not 0) ?). I have never called Microsoft, and never plan to.

        Some (sadistic) people like the idea that no matter how long they waited on hold, they have someone paid to listen to them complain and who will attempt (even if feebly) to help. I think perlmonks is the best resource for these things ... but i understand that some people would rather make a tech support person squirm on the phone now, then wait patiently, thus it would be a pro in some places.

        from the frivolous to the serious
(jeffa) Re: Perl versus VB
by jeffa (Bishop) on Jan 17, 2003 at 21:24 UTC
    The only reason i can think of to use Visual Basic is if you are developing the application for a client that already has all of the necessary licenses or you are working for a certified Microsoft "dev shop" who provides all of the necessary code and documentation for you. That's not a good enough reason for me ...

    Having been there, done that with Visual Basic (i literally converted from it to Perl back in February of 2001), i can say that i no longer desire to build applications with Visual Basic (same with .NET). I really liked MZSanford's "lacks heavy lifting features" con for VB, it really says a lot about why Perl is a favorite tool for those programmers who like to get stuff done (and still have some teeth and/or hair left at the end of the day).

    I should also mention, however, that the only GUI i use these days is a web browser. Programming in Tk reminds me too much of Java and web browsers have served my needs quite satisfactorily. There is Python of course, and if i couldn't use Perl/Tk to get the job done, i would most certainly use Python before i even thought about using ... what was that language again? ;)


    (the triplet paradiddle with high-hat)

      Having been there, done that with Visual Basic (i literally converted from it to Perl back in February of 2001), i can say that i no longer desire to build applications with Visual Basic (same with .NET). I really liked MZSanford's "lacks heavy lifting features" con for VB, it really says a lot about why Perl is a favorite tool for those programmers who like to get stuff done (and still have some teeth and/or hair left at the end of the day).
      I'd really like to add onto this. A few days ago I started in on a project at work. From the specs I could probably write a ten to twenty line perl program, have the problem solved and get back to my other more important projects. But no, I get to do the work in LotusScript (it's Visual Basic for Lotus products. It's 95% identical to Microsoft Visual Basic). Ugh! All in all the things I've found myself needing are a SQL GROUP BY/SUM/COUNT aggregator (except without SQL), hashes, arrays, regular expressions and the spiritual equivalent of anonymous code references.

      VB does have hash (called "List") and array support but it's extremely poor. I had to spend a good portion of my time writing some Hash and Array classes so I'd get all the things we take for granted here in perl (untyped variables, push, pop). I substituted VB's Like operator for a regular expression and got my anonymous code references through Execute which is somewhat like eval STRING except that all communication has to be done via globals. All in all I had to work a lot harder to get to (somewhat) the same place as the perl code could have gotten me.

      I still don't have a fully functional Array class but I didn't need things like shift, unshift so they didn't get put in. The Hash class works well enough I guess. The Like operator cannot be compared to regular expressions because you lose so much functionality. The code I wrote is inflexible in it's pattern matching support so if I ever need real regex then I can ask the client to go pay $200 for a license to VB Regexpr.

      The last bit though - code references I'm somewhat afraid it's not maintainable since I don't think my team has spent much time thinking about eval "". I'm sure they could pick it up but still... it's significantly scarier code than it would have to be if I were writing perl.

      I think the net effect is that VB can get you to the same (mostly) place as perl. You just have to work much, much harder and be more creative. Oh and it takes longer as well.

        I think the net effect is that VB can get you to the same (mostly) place as perl. You just have to work much, much harder
        That's a non-statement. Perl is implemented in C, which is compiled to machine code, so by definition both C as well as machine code can get you to the same place as Perl. The same applies for most any non-crippled language. I'm not sure anyone would be insane enough to try machine code for most of their tasks, though.. :) (And that's not to say I even hate machine code - written in assembly, anyway. When I do need it, I love it - getting another 400% speed-up after you did all your algorithm homework is great. I've done a bit of low-level graphics in my time and enjoyed that a lot.)

        Makeshifts last the longest.

Re: Perl versus VB
by sauoq (Abbot) on Jan 17, 2003 at 20:53 UTC


    • Pro: It's free.
    • Pro: It's open source.
    • Pro: It has an extremely helpful user community.
    • Pro: CPAN!
    • Pro: It's portable.
    • Pro: It's a powerfully expressive language.

    I don't really have anything to say about VB as I don't use it and never will. The very fact that it is completely proprietary is enough reason for me to ignore it.

    "My two cents aren't worth a dime.";
Re: Perl versus VB
by thezip (Vicar) on Jan 17, 2003 at 22:01 UTC

    Alas, I program on a daily basis with both Perl and VBscript.

    I find that VBscript is useful for ONLY the most trivial applications, due to:
    • the lack of complex data structures -- there are no HOH's, AOH's; in fact, there aren't even hashes! As a result, data access is often convoluted and doesn't really fit what I would consider a reasonable/maintainable solution
    • a low quality support system -- it's very difficult to glean information for those M$ obscurities (these are plentiful, BTW)
    • the fact that it feels like I'm driving one of those damned Autopia cars at Disneyland -- its not *really* driving, but the kiddies all think it is...

    Perl now, feels like I'm driving the Monorail. It's sleek, robust, and easily takes me to where I want to go. (sorry for all the Disneyland analogies...)

    I find that I can prototype things quicker, and I never run into language limitations. I can't count how many times I've started coding something in VBscript, only to trash the code and redo it in Perl.

    The other confusing thing about M$ is that things just don't work like they're supposed to. Regexes, subroutines, modularization, etc., just feel wrong (weak, unnatural, <insert your favorite pejoratives here>)

    Where do you want *them* to go today?

      I have to point out that VBScript is a severely limited subset of Visual Basic. It would be fairer to compare VBScript with PerlScript, or Visual Basic with Perl.

      Which brings up a point that nobody else has mentioned so far - Visual Basic is not suitable for use in programming Web applications.

      That's a severe limitation for most people these days.

        um, actually, perlscript is exactly the same as perl, except that it supports ASP-like <%..%> syntax. so there you go.
Re: Perl versus VB
by boo_radley (Parson) on Jan 17, 2003 at 23:00 UTC
    Please consider also that a GUI interface is important and the only good one in Perl I know is the Tk module. I already know a good advantage of Visual Basic
    Take a look at wxperl. It's a good alternative to tk, and uses native widgets across its supported platforms. Although I'm not sure what you mean by "supported by Microsoft Applications", but I've been able to program Outlook clients, Excel spreadsheets, and Win32 process monitors in perl, and (in the case of outlook) perl's win32 bindings made the task easier than VB.
Re: Perl versus VB
by runrig (Abbot) on Jan 17, 2003 at 22:27 UTC
Re: Perl versus VB
by chinman (Monk) on Jan 18, 2003 at 16:28 UTC
    Instead of Perl vs. VB, one option is to use Perl and VB. Personally, I prefer to use Perl as my programming language, but I do like VB for creating the GUI on Windows systems. With ActiveState's PDK, you can use PerlCtrl to make a DLL that will allow you to call your Perl code from within VB. The disadvantages of the approach is that it is Windows-specific and costs money. But if you are already familiar with Perl/VB AND your target audience is Windows only, it may be an approach to consider.

    Regards, chinman

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://227771]
Approved by jlk
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2016-02-11 15:42 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (374 votes), past polls