On Sat, Sep 05, 2009 at 02:29:46PM +0200, Moritz Lenz wrote:
> [...]
> However there is a problem which prevents it from building: some classes
> (namely Rat and IO::*) are defined only in the setting, and then used
> later on in other setting files. Since type names must be known at parse
> time, this causes parse errors in the files that use such types but
> don't declare them.
> 
> I have no idea what the best solution is; some ideas are:
> 
> 1) define all classes in PIR, and augment them in setting
> or
> 2) introduce dependencies between the setting files, and manually import
> the dependent types
> or
> 3) have a file in the setting which contains all the class definitions
> on which the others depend, compile that first, and make (at least
> notionally) every other setting file depend on that.
> 
> Somehow they look all wrong (and 2 and 3 complicated) to me - any better
> ideas?

(already discussed on #perl6 -- adding to the thread for completeness)

4)  Enable a "class stub" syntax that allows us to declare a given symbol
    as being a valid class without having to declare the body of the
    class at that time.  For example:

        class Rat { ... };

Pm

Reply via email to