At 10:10 PM +0530 1/23/03, Gopal V wrote:
If memory serves me right, Erik Bågfors wrote:

 But if I write a library in ruby that depends on the missing_method
 method it will not be usable from other languages, since those languages
 doesn't call missing_method if the method they try to call doesn't
 exist.
Hmm... that's twisting language features with virtual machine instructions.
Actually that's a gray area as far as I can see ... we'll have to go on
with `n' number of methods for `n' languages for member resolution ...
Grey? Heck, take a step back, lots of parrot is done up in neon paisley. :-P

 > Of course, in real life I don't think that's a problem because I haven't
 seen much use of missing_method.
Unfortunately I use a lot of __getattr__ for my python code (especially
GUI) ...
Perl also makes heavy use of this in some of the more interesting modules.

 > Also, having a instruction would be faster which of course is more fun
 :)
Yes... But this not only makes it ugly (as an instruction) , but slow as
well ? . Like you said only a small number of people use this feature ,
does it make sense to slow down the rest ? . And how does hacker ZZ add
a new language with a different member lookup without getting his patches
inside Parrot ?..
That's why the smarts isn't in the opcode function, but rather in the
vtable method lookup function. That way you only pay the cost if the
feature is used.

This can also work to the advantage of languages that need this
feature, as it means that classes that don't have to have a fallback
method lookup can use a faster lookup function that doesn't need to
do a second trace to look for missing functions.

Anyway I'm not *against* implementing this , I'm just questioning the
*need* to implement this ... Just a question for the philosophers ...
The philosophers, alas, got drunk and started fighting over the one
fork at the table. Very messy.
--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to