Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Converting VB to Perl,....and Visa Versa

by Theo (Priest)
on Sep 28, 2004 at 19:07 UTC ( #394715=note: print w/ replies, xml ) Need Help??


in reply to Converting VB to Perl,....and Visa Versa

The biggest problem with converting from VB to Perl will be replicating the VB security problems. ;-)

-Theo-
(so many nodes and so little time ... )


Comment on Re: Converting VB to Perl,....and Visa Versa
Re^2: Converting VB to Perl,....and Visa Versa
by hardburn (Abbot) on Sep 28, 2004 at 21:11 UTC

    Yes, we can all take jibes at VB's "security problems". Really, VB isn't any more or less secure than any other language (and it at least has a few things that give it an edge over C/C++, like garbage collection and array bounds checking). VBScript is another matter, but mostly because of having a broad execution environment, not because of the language itself.

    "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Re^2: Converting VB to Perl,....and Visa Versa
by gryphon (Abbot) on Sep 29, 2004 at 03:00 UTC

    Actually, VB has no more security holes than C#. They both get compiled to the CLR anyway. If there are any holes, it's in .NET, not VB.

    Personally, I dislike VB for the same reason someone mentioned in a previous post about translating VB to Perl but not the other way around. The whole point of a language is that it represents ideas. The easier it is to represent complex ideas, the better the language. (Yeah, yeah. I know. "What about speed," you ask? I say it's a secondary concern, IMHO. CPUs are far cheaper than dev hours. Just ask Classmates. They migrated their entire code-base from Perl to JSP a couple years ago, and they've been universally hating it.)

    VB can represent simple operations fairly well, but so can Perl. When you get into complex stuff, though, VB breaks down. I once tried to code in VB what took 1 line of Perl. I had to write two modules, define some classes and such, and add about 100 lines of code. It was an eye-openning experience.

    As a basic example, both VB and C# compile to more or less the exact same CLR code. However, it's easier to express ideas in C# than VB. (Why else do you suppose most .NET devs prefer C#?)

    Anyway, to answer the OP, I don't know of any VB-to-Perl translator. While it would be fairly simple for core VB, it would be a monumental task to deal with all the exceptions and add-ins. So why are you wanting a translator anyway? Do you need to port a legacy product from one language to the other? Do you need to embed Perl into VB, or VB into Perl? For the former, check with ActiveState.

    gryphon
    code('Perl') || die;

      EXACTLY

      This is what I have found, simple Perl loops and routines takes ages to mimic in VBS. And What I canít get over in the slowness of VBS!!!

      I was offered a contract as VBS developer!!! They took me on based on my Perl knowledge. In my interview I was asked about general programming techniques and various OS knowledge which I had no problem answering. Then they got in to more detailed programming questions about VBS, here I informed that my VB knowledge only extends to WSH (which I only done through Perl). Then, the interviewers put to me various situation where a code is required and how I would go about generating the code, I answered as if I was doing it in Perl BUT without mentioning the word Perl, so they assumed that how its done in VBS! I have never written any VBS in my life. But I got the contract Thought! Now I have to find a way to get rid of all them VBS stuff (when I start with them in 2 weeks time) or I am screwedÖ.:-D

      Blackadder
Re^2: Converting VB to Perl,....and Visa Versa
by blackadder (Hermit) on Sep 30, 2004 at 10:04 UTC
    LOL,....I agree. And its hard to replicate VB slowness too.

    I must find away to convert every VBS stuff we have here to Perl.

    So far my only real option is to learn VB so well so that I can convert the code to Perl on the fly....

    Oh Gosh,...I need to learn Perl so good too.

    ***** This is in response to Theo's post.**********
    Blackadder

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://394715]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-12-18 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (44 votes), past polls