On Mon, Feb 15, 2016 at 11:53 AM, Denis Kudriashov <dionisi...@gmail.com> wrote:
> > 2016-02-15 15:32 GMT+01:00 Mariano Martinez Peck <marianop...@gmail.com>: > >> As far as I can remember (this was about 4 years ago) The use of >> #cannotInterpret: was the only way to be able to intercept everything >> without breaking the system. Subclassing from ProtoObject make your proxy >> to understand some messages. Subclassing from nil was technically possible, >> but I found out the system would simply crash as it didn't know at all how >> to handle other subclasses of nil. Even with the debugging support I added >> as you can read in the paper. Maybe things have changed. >> >> If subclassing from nil does not break the system and you can still >> inspect, debug proxies, then sure, you can give a try to Ghost using #dnu >> rather than #cannotInterpret:. In fact, I would like to have a dnu-based >> approeach that is as reliable as it was #cannotInterpret: in the sense of >> how much I can intercept. With #cannotInterpret I could trap EVERYTHING >> (everything but #==) and then decide what to do. Subclassing from nil would >> get you there too if you make it work. >> > > Actually I already implemented it many yeas ago for Mocketry. But > subclassing from nil works correctly only in VW. I got problems when > porting it to Squeak (at that time). > Exactly. And myself in Pharo 4 years ago. > Now I want to give DNU another chance. > Sure, it's a good idea. > It will simplify logic very much. It will remove strange hierarchy of > proxies which is needed for trick but raises many questions. > You mean the hierarchy because of #cannotInterpret: is sent to the superclass? If true, then yes, it will simplify that. -- Mariano http://marianopeck.wordpress.com