develooper Front page | perl.perl6.language | Postings from January 2001

Re: Why shouldn't sleep(0.5) DWIM?

Thread Previous | Thread Next
From:
Andy Dougherty
Date:
January 31, 2001 06:48
Subject:
Re: Why shouldn't sleep(0.5) DWIM?
Message ID:
Pine.SOL.4.10.10101310941340.3592-100000@maxwell.phys.lafayette.edu
On Wed, 31 Jan 2001, Bart Lateur wrote:

> On Tue, 30 Jan 2001 21:39:25 +0100, abigail@foad.org wrote:
> 
> >Why the urge to move it out of the core? Should perl6 be like Python,
> >where you first need to do a gazillion imports before you can do anything
> >useful? Say goodbye to quick one-liners then.
> 
> It doesn't have to be like that. Functions that are not in the core can
> still be automatically loaded, but only if your code actually uses them.
> That could make the perl kernel a lot smaller than it is now, and
> hopefully, make it load faster.

This is a persistent myth.  Moving such functions out of the core may
indeed make the perl kernel cleaner, but I seriously doubt it will make
it "a lot smaller" or have any significant impact on load time.  You
can try it and see with perl5, or search the perl5-porters archives for
my previous reports on the subject.

For example, removing time() from the perl5 core means excising the 
following from pp_sys.c:

    PP(pp_time)
    {
	djSP; dTARGET;
	XPUSHi( time(Null(Time_t*)) );
	RETURN;
    }

and replacing it by the appropriate auto-loading glue.  This is not a big
space savings.  

-- 
    Andy Dougherty		doughera@lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042


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