Hey all.
    Unfornatly, I don't have as much time for perl6 hacking as I'd like --
real life is rather getting in the way.

Therefore, the following RFCs are up for adoption:
149 (v1): Lvalue subroutines: implicit and explicit assignment -- This is a
comprimize RFC between the two lvalue subrotine RFCs.
RFC 77: Suggested isa() operator. -- The one described here is possibly a
bit of overkill, but it'd be nice to have somthing like this.  You could get
rid of the implicit recrusion by having a generic deref operator.
RFC 163: Automatic accessors for hash-based objects -- This is the good one
of mine <G>.  I would really like to see somthing like this in perl6.  Get
rid of the byzanthine access specifiers, and just get a :laccess, :raccess,
and :access method.  Look at the archives of perl6-language-objects for a
conversation between Nathan Wiger and I on this -- I like his ideas on this.

And finaly, one more idea -- constant folding for arbitrary subs /
automemonization / :indempotent function attribute.

OK, here's the idea.  A function (sub) can have the :indempotent attribute
set on it.  This tells perl that the function is indempotent, that is that:
1) An invocation of the function with the same arguments always returns the
same result (it is algerbricly functional).
2) It has no side effects.  (Invoking it in void context would have
absolutly no effect).

This would allow lots of optimozation -- you could constant fold it at
compile time.  For example, it'd make the dequote() function have zero
runtime overhead.

Also, you could memonize -- cache the return of the function.

Alternatively, give a :compiletime attribute to a sub.  Then when compiling
any calls to the sub, it's called with the (partialy formed / lazy ?)
arguments given to it, and can return a value.  If it returns undef, it will
be taken as "unable to tell now, ask me at runtime".  It might be possible
to destroy the sub before runtime in certian circumstances (but only "my
sub"s?).  There would have to be some way of telling the sub if it's being
called at compiletime or runtime.

Please CC me on any replies; I'm probably going to unsubscribe from
perl6-language-*.

    -=- James Mastros

Reply via email to