[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with rationale & design



At Tue, 22 Jun 2004 00:03:26 +0200, felix wrote:
> 
> Michael Sperber wrote:
> >>>>>>"Felix" == Felix Winkelmann <felix@xxxxxxxxxxxxx> writes:
> > 
> > 
> > Felix> Come on, go ahead, give some details. Millions of lines,
> > Felix> handwritten?  Where?
> > 
> > The "millions of lines" is from a thread on a different forum.
> 
> Yes, I've seen it, and I (partially) stand corrected, but we still don't
> know how many of that code is hand-written Scheme.

If the argument is that millions of lines requires separate
compilation, it doesn't really matter whether the code is hand-written
or not (the compiler sure can't tell).

> > I have programs on the order of 100000 lines of Scheme code under my
> > personal maintenance.  I see no reason why that wouldn't scale to
> > millions, if it came to that.
> 
> So do I, yet that's not the issue. Millions of lines is millions of
> lines.

Indeed, there's an order of magnitude difference.  It's interesting to
note that for interpreters this really isn't that big a deal though.
Perl programs that scale up to hundreds of thousands of lines often
started as little throw-away scripts, and the only thing it costs is
start-up time.  Despite the complexity of the Perl parser and the fact
it doesn't even use an intermediate byte-compiled form, large Perl
programs don't start noticeably slower than their C counterparts.

And with machines getting faster and faster, with human written
programs not getting much larger (arguably getting smaller with new
languages and abstraction techniques) separate compilation may not be
as crucial as people think.  But there's another feature that implies
separate compilation which seems much more important, and that's
dynamic loading.  Essentially all substantial programs, from the
merely large (OS kernels) to the gargantuan (web browsers) make use of
dynamic modules/plugins.  Both from the sheer number of possible
modules, and in order to allow 3rd party extensions, it's necessary to
be able to load code that is unknown at compile time, and I think a
module system that attempts to handle millions of lines of code
without this feature is missing the boat.

On quick survey PLT supports this with dynamic-require, which is
pretty liberal - for efficiency it may be reasonable to require the
module satisfy a compile-time interface.

-- 
Alex