Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^2: Java programming and Perl

by heatblazer (Scribe)
on Dec 04, 2012 at 10:54 UTC ( #1007060=note: print w/replies, xml ) Need Help??

in reply to Re: Java programming and Perl
in thread Java programming and Perl

Well, I agree with that PerlInterpreter will cause a size overload, but as I read now, Java`s default embed scripting language for end users is Rhino and it`s a javascript written in java. I was interested in Perl as end user script language instead of JS, because Perl is much more powerful and flexible, with CPan and the textual process power, so using Perl is definitely > than JavaScript. I don`t know if size overload is greater in priority than lose of functionality.

Replies are listed 'Best First'.
Re^3: Java programming and Perl
by davido (Archbishop) on Dec 04, 2012 at 11:12 UTC

    Your curiosity is a desirable attribute. But let me make a suggestion. I've embedded Perl interpreters into C and C++ projects before. It's not terribly difficult to get something simple up and running. A basic framework is found in perlembed. However, it can get very complex, very fast.

    My suggestion is this: Read perlembed thoroughly, and then get an interpreter embedded in a C program. Put it through its paces with C first, before ever considering moving onto the next step of exposing the C code to Java. In particular (since you mention the power of CPAN), work on getting the embedded interpreter to work with CPAN distributions that you think will be used by your Franken-Java creation.

    Interfacing Perl with other languages at an 'internals' level is one of those pursuits where it's best to learn to walk before trying to run. When you look down you'll notice that you're skirting a cliff. ;)


      Thanks for the interesting topic. I totally agree it gets quite a bite for me to handle. Indeed it looks scary... not as cliff tho` :)

Re^3: Java programming and Perl
by ColonelPanic (Friar) on Dec 04, 2012 at 11:11 UTC

    I do have to admit, there is definitely a "cool factor" to using Perl on Android. As long as you are just experiementing, go ahead and have fun!

    Still, if you plan to release your app to others, you have to think about the costs. This will add at least several megabytes to your project. You will also be using a build of Perl that is experimental.

    This is not about the superiority of Perl to Javascript--I agree 100% that Perl is a better language. This is about the appropriateness of the tool for your task. Perl on Android would almost never be a good choice for a production app.

    When's the last time you used duct tape on a duct? --Larry Wall

      Point taken, thanks for the advice. It`s definitely a shame that no other script language derivates the ideas of Perl. Since I know JS enough for simple end user scripting, I`ll stick with it... or till Perl-Java hybridization gets further, so I`ll be prepared for that hour. Regards.

        "It`s definitely a shame that no other script language derivates the ideas of Perl.

        Actually, Ruby is pretty similar to Perl.

        perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007060]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2018-06-20 23:37 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (117 votes). Check out past polls.