Simon Cozens writes:
: This also led me to think about what happens when we introduce new built-ins.
: Perl 5 has had a complete built-in freeze for a long long time now because
: you can't bring in a new built-in without risking smacking subroutines in
: old code.

Right, that's been an impediment to continuing evolution.

: We can get around that in Perl 6 by reversing the precedence: let user-defined
: subroutines and methods take priority over built-ins. This would allow for
: easy overloading ("sub open { ... }") and give us forward-compatibility. (If
: you want to be sure you're working with built-in open, just use CORE::open)

Yes, that's what we're doing.  Make everything a core method that can
be a method, make everything else a core subroutine, still overridable.
(And try to blur the distinction so people don't much care whether
length() is a method or a subroutine.)

: Maybe something similar for properties.

That's what I thought I said.  Real methods always override the fake
methods of run-time properties.  (Subtext: don't use properties when
you should be using methods.  I'm sure some people would claim that's
always.)

Larry

Reply via email to