develooper Front page | perl.perl5.porters | Postings from April 2010

Re: Slim core, battery suppliers [was: Try::Tiny in Core?]

Thread Previous | Thread Next
From:
Charles Bailey
Date:
April 8, 2010 20:15
Subject:
Re: Slim core, battery suppliers [was: Try::Tiny in Core?]
Message ID:
w2tb78749dd1004082014na68d5cb5n1589195b616b1f7d@mail.gmail.com
On Thu, Apr 8, 2010 at 11:04 AM, Andy Dougherty <doughera@lafayette.edu> wrote:
> On Thu, 8 Apr 2010, Nicholas Clark wrote:
>
>> On Mon, Apr 05, 2010 at 10:24:39PM +0100, Ben Morrow wrote:
>> > Quoth nick@ccl4.org (Nicholas Clark):
>> > >
>> > > So I can't see how the whole tree can be done this way. Given that DynaLoader
>> > > needs XS compilation, and DynaLoader.o needs to be built to build perl,
>> >
>> > Is there a good reason for this? That is, is there some reason dl_*.c
>> > can't just be included in the normal build, rather than an extension? We
>> > would still need an ext/DynaLoader/Makefile.PL to do the preprocessing
>> > on DynaLoader_pm.PL, but it could become a nonxs module.
>>
>> Good question, and one I'd not thought of.
>> I don't know, but I'm guessing that it's this way because
>>
>> a: it always was this way
>> b: it was historically assumed that it's easier to write XS than to write
>>    equivalent C code
>
> It's more that it organically grew that way and never changed.
>
> Originally, there was no dynamic loading of any sort.  Larry wrote the
> first dlopen()-based dynaloader (perl5alpha6 or so, I think).  Others soon
> contributed versions for other operating systems (e.g. HP/UX, NeXT, etc.).
> Since dynamic loading wouldn't work everywhere, it was natural to think
> of it as an "extension", and not include it in the normal build.
> Certainly that's how I thought of it.

That matches my recall pretty closely.  ISTR that dynamic loading was
new-ish on some of the systems where Perl built, let alone to Perl
itself, and it wasn't as accepted as it is now that dynamic extensions
were a Good Thing for  production use, as opposed to static linking a
la sybperl and friends for at least frequently-used extensions.  I
remember a lot more discussion of baking in extensions during the Perl
build, and of MakeMaker's ability to build a new static perl, the
corollary being that one might not need the DynaLoader.


-- 
Regards,
Charles Bailey
Lists: bailey _dot_ charles _at_ gmail _dot_ com
Other: bailey _at_ newman _dot_ upenn _dot_ edu

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About