Re: Perl 6 code - a possible compile, link, run cycle

2005-08-26 Thread Adam Kennedy

Ingo Blechschmidt wrote:

Hi,

Yuval Kogman wrote:


On Thu, Aug 25, 2005 at 15:42:28 +0200, Ingo Blechschmidt wrote:


This section will contain all information needed:
* User-defined operators
* Other symbols exported by is export
* Exported macros


Okay, this raises a distinction:

Compile time exports
Runtime exports



Well, all exports happen at compile-time, but you're right, some exports
(regular subs) will probably not be used before runtime.


Excuse my stupid question, but what about the equivalent Perl 6 case to 
the following.


use Module qw{symbol};

BEGIN {
die Not ready to compile if symbol();
}


Re: Perl 6 code - a possible compile, link, run cycle

2005-08-26 Thread David Formosa \(aka ? the Platypus\)
On Thu, 25 Aug 2005 16:25:51 +0300, Yuval Kogman [EMAIL PROTECTED] wrote:

[...]

 On Thu, Aug 25, 2005 at 11:16:56 -, David Formosa (aka ? the Platypus) =
 wrote:

[...]

 use has the potentional to change the way the compiler
 parses the code.  So use needs to be regarded.
 
 Hmm... Good point.
 
 I don't know how this is dealt with WRT to the every module is
 compiled with it's own compiler approach perl 6 is supposed to
 have.

When compiling modules the compiler can seperate out stuff that will
modify the caller's enviroment (exports ect) and thouse that will
not.

When use is seen, only this outward facing code needs to be examined.

[...]

 Perhaps the use macro could do this on it's own.

Seems sound.

-- 
Please excuse my spelling as I suffer from agraphia. See
http://dformosa.zeta.org.au/~dformosa/Spelling.html to find out more.
Free the Memes.