Chaim Frenkel wrote: > >>>>> "NI" == Nick Ing-Simmons <[EMAIL PROTECTED]> writes: > NI> The "mg.c" 'magic hacks' are in essence applying vtable semantics (they > NI> are even called vtables in the sources) to a subset of "values". > NI> So yes vtables mean evrything is "magic" so nothing needs "special magic"... > > Some 'official' method of passing on calls will be needed. So that it is > easier to write magic. I think types will be cheap. Doing magic might be something like: add fetch magic to value: new_type = copy_type(value->type) new_type->fetch = my_magical_fetch value->type = new_type Of course, one of the standard types could be a "magic" type that checks for per-value magic methods before dispatching to the value's normal type table. I don't see that being necessary, but it's nice to know it's possible. - Ken
- Re: Method call optimization. Chaim Frenkel
- Re: Method call optimization. Chaim Frenkel
- Re: Method call optimization. Graham Barr
- Re: Method call optimization. Chaim Frenkel
- Re: Method call optimization. Nick Ing-Simmons
- Re: Method call optimization. David L. Nicol
- Re: Method call optimization. Dan Sugalski
- Re: Method call optimization. Nick Ing-Simmons
- Re: Method call optimization. Nick Ing-Simmons
- Re: Method call optimization. Nick Ing-Simmons
- Re: Ramblings on "base class" for ... Ken Fox
- Re: Ramblings on "base class" for ... Larry Wall
- Re: Ramblings on "base class" for ... Dan Sugalski
- Re: Ramblings on "base class" for ... Chaim Frenkel
- Re: Ramblings on "base class" for ... Dan Sugalski
- Re: Ramblings on "base class" for ... Larry Wall
- Re: Ramblings on "base class" for ... Ken Fox
- Re: Ramblings on "base class" for ... Nick Ing-Simmons
- Re: Ramblings on "base class" for ... Nick Ing-Simmons
- Re: Ramblings on "base class" for SV etc. Nick Ing-Simmons
- Re: Ramblings on "base class" for SV etc. Dan Sugalski