Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Extensions (Score:3, Interesting)

    How will writing C extensions in Perl 6 compare to Perl 5 (XS)? Will it be easier?
    • FWIW, this falls in the realm of "Parrot Questions" rather than "Perl 6 Questions" since you used the magic "C" word.
      • I think I disagree, unless you think that the Parrot team will be designing the new version of XS. To my mind XS is basically a programming language unto itself, and one that is sorely in need of redesign, not just reimplementation.

        I think it needs to be addressed in the Perl 6 design and not just left to the geeks in the trenches.

        -sam

        • The Parrot team will be designing the new version of XS. It's got to--it is, for all intents and purposes, Parrot's API to the outside world, and thus not really a Perl-6-the-language issue.
          • That's strange - Perl5's API is distinct from XS. Is the XS layer going away?

            -sam

            • by Elian (119) on 2002.05.13 14:14 (#8321) Homepage Journal
              Oh, you're talking about the CODE:/PPCODE:/MODULE stuff? Yeah, that's all going. Parrot extensions will be plain with at best some metainformation in a separate file to drive the linking and possibly the yanking in or autogeneration of some default routines.
              • That sounds pretty bare-metal to me. Maybe the Parrot guys design this layer and then the Perl 6 designers add something on top?

                It's possible to build "plain" Perl 5 modules too, but who would want to? XS exists to make programming Perl 5 modules in C easier. Is there good reason to think that Perl 6 won't need something similar?

                -sam

                • Re:Extensions (Score:2, Interesting)

                  XS exists because programming perl 5 modules in C is so hard. Programming bare against Parrot will be easier than programming with XS.

                  Don't forget that the same standard also needs to be there for any other language hosted on Parrot--a C extension should look the same for Perl as it does for Ruby, Python, Scheme, or BASIC. That puts the responsibility of how it looks and works on the shoulders of the Parrot folks, not the Perl language design folks.
                  • XS exists because programming perl 5 modules in C is so hard. Programming bare against Parrot will be easier than programming with XS.

                    Is there a design spec that can back up this statement? I've heard this said before but I fear that simply wishing won't make it so. In particular, I wonder if the register architecture will be difficult to manipulate at a low level. Stack machines have their faults but they do generally win in accessibility.

                    Don't forget that the same standard also needs to be there

                    • Extensions won't be touching the registers. In general, extensions won't have any knowledge of the workings of the interpreter, since we might, and probably will, at some point do a good-sized reworking of the internals.

                      As for perl special stuff at the XS level... there isn't much. In fact, there's almost nothing at all. (I'd say nothing, as I can't think of anything perl specific, but there may be something small that I'm missing) Variables, stashes, calling conventions, methods, and all that stuff are la
                    • So they aren't any specs on this yet, right? Ok. I'll reserve my judgement for a later date.

                      -sam

                    • Re:Extensions (Score:2, Interesting)

                      Yup, no specs yet. High up on the biggish todo list, if only because I need to speak about them at TPC. :)

                      Should have a preliminary spec within a week, I think.