Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Perl 6 and trend towards web-based applications

by thor (Priest)
on Jan 15, 2005 at 15:51 UTC ( #422513=note: print w/replies, xml ) Need Help??


in reply to Re: Perl 6 and trend towards web-based applications
in thread Perl 6 and trend towards web-based applications

It easy to create "glue code"
Slightly off topic, but I wonder how true this will be in Perl 6. Part of the beauty of Perl 5 (in my opinion) is that it has XS. Not that XS is pretty, but it allows one to write code that allows perl to interface with existing C libraries. I may be speaking out of ignorance, but with XS going away in Perl 6, will we still have that ability? If not, I see Perl's ability as glue greatly diminished.

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

  • Comment on Re^2: Perl 6 and trend towards web-based applications

Replies are listed 'Best First'.
Re^3: Perl 6 and trend towards web-based applications
by grinder (Bishop) on Jan 15, 2005 at 16:30 UTC
    will we still have that ability [...] to interface with existing C libraries

    Of course we will, and it will be much, much easier. For starters, check out Parrot's Foreign Library Access. You can open a shared library, DLL or whatever, and then just start using it. Parrot already has a fair amount of smarts to let you specify the calling conventions. Many XS problems will simply vanish because of the level of support that Parrot provides intrinsically.

    And if Parrot can do that, you can be sure it will be easy to tap from Perl. And it will be Good.

    - another intruder with the mooring in the heart of the Perl

      Hmm...somehow, I doubt that it will be as easy as the doc you pointed to suggests. If it were that easy, why haven't C compilers gotten rid of the need for header files? Something tells me that you'll at least need the header file.

      thor

      Feel the white light, the light within
      Be your own disciple, fan the sparks of will
      For all of us waiting, your kingdom will come

        As a developer of the glue code, you'll need to have intimate knowledge of the function signatures and data structures contained within the header file (assuming you're gluing some existing C library to perl). But once the glue is developed, you won't need the header file at all because all of the info will be in the parrot source file or the perl6 module. In other words the C header file becomes a perl and/or parrot source file. Writing in perl for extensions is a whole heck of a lot easier than writing some in perl, some in C and requiring a C compiler.

Re^3: Perl 6 and trend towards web-based applications
by Tanktalus (Canon) on Jan 15, 2005 at 16:09 UTC

    I can't imagine it - even the Java purists put in JNI, albeit somewhat reluctantly (at least the way I heard it). I can't currently find the reference, but I'm pretty sure that when I read that XS was "going away", it was being replaced with something simpler. Which would be quite welcome here - the learning curve for XS has been a bit too much for my tastes so far.

Re^3: Perl 6 and trend towards web-based applications
by dpavlin (Friar) on Jan 18, 2005 at 14:27 UTC
    I would gleadly forget all XS stuff, even in perl5 if P5NCI is working good enough (another well-hidden gem by chromatic).

    2share!2flame...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2018-06-21 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (118 votes). Check out past polls.

    Notices?