develooper Front page | perl.perl6.language | Postings from March 2005

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

Thread Previous | Thread Next
Larry Wall
March 30, 2005 11:53
Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?
Message ID:
On Wed, Mar 30, 2005 at 12:05:12PM +0200, Thomas SandlaƟ wrote:
: If I understand you correctly the use statement is more like a
: linker/loader directive than a compile time interface include?

That is up to the module being used.  "use" is a linker, but it's
only required to link enough information into the caller such that
the caller can see the interface.  Loading can happen later--though
it typically happens on first "use" rather than first use.  The
point is there's no separate linker step.  Everything is demand
driven, and what gets linked in at compile time depends on what gets
demanded at compile time.  If something isn't demanded till run
time, the compiler can't know it, unless you tell it in advance
somehow, which presumes that *you* know it.   And maybe you don't.
And that is when late binding is ever so much handier than early.

: BTW, is it foreseen to have a clear conceptual split between the
: compiler and the loader? Or is that all blurred?

Clear conceptual splits often hide false dichotomies.  The split is
rather blurry for Perl 5, and Perl 6 will only continue the trend.
There are good uses for both early binding and late binding, and
for various forms of binding in between--it's a continuum, and each
module is allowed to draw the boundary wherever and however it likes.
Birds naturally prefer early binding to late binding; worms will
naturally disagree.  Rolling stones gather no type constraints.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About