On Tue, 16 Sep 2003 [EMAIL PROTECTED] wrote: > On Mon, 15 Sep 2003, Dan Sugalski wrote: > > > Great. But will it also be possible to add methods (or modify them) > > > to an existing class at runtime? > > > > Unless the class has been explicitly closed, yes. > > That strikes me as back-to-front. > > The easy-to-optimise case should be the easy-to-type case; otherwise a lot > of optimisation that should be possible isn't because the programmers are > too inexperienced/lazy/confused to put the "closed" tags in.
It would, in fact, be back-to-front.... if performance was the primary goal. And, while it is *a* goal, it is not *the* goal. >From Parrot's standpoint, it doesn't make much difference--once you start spitting out assembly you can be expected to be explicit, so it's a matter of what the language designer wants. While Larry's the ultimate arbiter, and I am *not* Larry, generally he favors flexibility over speed as the default, especially when you can get it at the current speed (that is, perl 5's speed) or faster. You don't lose anything over what you have now with that flexibility enabled, and if you want to restrict yourself for the extra boost, you can explicitly do that. Then again, he may also decide that things are open until the end of primary compilation, at which point things are closed--you never know... :) Dan