Re: RFC 137 (v1) Overview: Perl OO should I<not> be fundamentally changed.

[email protected] (Piers Cawley)
Newsgroups perl.perl6.language.objects
Message-ID <[email protected]>
Perl6 RFC Librarian <[email protected]> writes:

> =item *
> 
> Changes to the semantics of C<bless> so that, after associating an
> object with a class, the class's C<INIT> methods are automatically
> called on the object. An additional trailing C<@> parameter for
> C<bless>, to allow arguments to be passed to C<INIT> methods.

Ooh:

    sub INIT {
        $ME->_init unless $ME->initialized;
        my $tok = $ME->parser->next_token;
        my $next_state = $ME->handle($tok);
        bless $ME => $next_state;
    }

That OO state machine idea I keep toying with gets more and more
scary. Of course, the call stack could get rather deep...
        
-- 
Piers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.