On Fri, 2005-10-07 at 15:22 -0600, Luke Palmer wrote: > On 10/7/05, chromatic <[EMAIL PROTECTED]> wrote:\
> > If I added a multisub for Array assignment so that assigning an integer > > value set the length of the array, would 97 be compatible with Array? > You're not allowed to overload assignment. $ perldoc perltie I don't really care how I do it, provided that I don't have to write PIR or C just to make this possible, but I want the option to have at least same power as Perl 5 to do weird things if that's what it takes to do really useful things that you or I or @Larry can't imagine right now. > But you are allowed to overload coersion. Essentially, every > expression gets a coerce:<as>($expr, $current_context) wrapped around > it (where these are optimized away when they do nothing). If you > allow definition of these at runtime, there are two side-effects: > > 1) No typechecking can ever take place in any form. > 2) No coerce calls can ever be optimized away. > > These are very unfortunate. So I'm inclined to say that you can't > overload coersion at runtime. No one can ever overload assignment or coercion at run time because you want theoretical programs you haven't yet to run VERY VERY FAST? Me, I just want to get my job done without always having to ponder the beauty of type conceptual purity while I'm fiddling with BEGIN blocks and CHECK blocks and INIT blocks, trying to dodge inscrutable type mismatch errors while guessing the combination of the locks on the escape hatches built into the language. I'm sort of feeling the inclination to argue for a lexical RUN VERY VERY FAST switch that lets you (or me sometimes) the programmer say "Go on and hurt me" when it's totally worth it, not to apply cheese graters, hot peppers, and David Hasselhoff CDs with fulsome B&D glee to every programmer who ever types "perl6 ./hello_world.pl". -- c