Dan Sugalski wrote: > Do we want to allow a variable to have multiple types of magic on it > simultaneously? Absolutely. It's a design requirement. Fortunately with vtbls it's easy -- we just use mix-ins. Mix-ins are partial implementations of a type that are designed to be merged into a full implementation of another type. For example, there could be a "tracing" mix-in which just defines the assignment op. When this is mixed into an existing type the old assignment op is saved and the mix-in assignment op takes its place. (Whether to save or not is the responsibility of the mix-in type.) If we don't want global changes (all objects of a type get the new behavior), we have to build a new type. Unfortunately the order that mix-ins are applied change the type. - Ken
- 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 cla... Ken Fox
- Re: Ramblings on "base cla... Larry Wall
- Re: Ramblings on "base cla... Dan Sugalski
- Re: Ramblings on "base cla... Chaim Frenkel
- Re: Ramblings on "base cla... Dan Sugalski
- Re: Ramblings on "base cla... Larry Wall
- Re: Ramblings on "base cla... Ken Fox
- Re: Ramblings on "base cla... Nick Ing-Simmons
- Re: Ramblings on "base cla... Nick Ing-Simmons
- Re: Ramblings on "base class" for ... Nick Ing-Simmons
- Re: Ramblings on "base class" ... Dan Sugalski
- Re: RFC: Foreign objects in perl Benjamin Stuhl
- Re: RFC: Foreign objects in perl Dan Sugalski
- Re: RFC: Foreign objects in perl Simon Cozens
- Re: RFC: Foreign objects in perl John Tobey
- Re: RFC: Foreign objects in perl Bart Schuller
- Re: RFC: Foreign objects in perl Simon Cozens