Webmaster wrote:
> Both RFC 168 & 267 complain about the inability to override builtins. What
> if p6 simply require all user defined functions to be called using the &func
> syntax, and that builtins require the bareword syntax?
Uh, how does that result in overridability?
Sounds to me more like a barrier to it.
> This way any builtin
> could be overridden and it would be immediately recognizable as an
> overridden version.
Again, that's kinda counter to the idea of transparency, of which
overriding is a form.
> By implementing it this way, one could also assume that
> the original could be 'inherited', by simply calling the builtin (i.e.,
> C<sub ord{ my $val = shift; lc($val); return ord( val );}> - and call it
> using C<&ord($str)>).
That's what namespaces are for, e.g. CORE::.
sub ord { my $val = shift; lc($val); return CORE::ord( val ); }
--
John Porter
We're building the house of the future together.