On Tue, Mar 31, 2015 at 8:05 PM, Clément Bera <bera.clem...@gmail.com>
wrote:

> Hey Sean,
>
> Now to create a proxy you need to subclass ProtoObject and not nil.
>
>
Yes, subclassing from nil was never a good idea.


> This was changed years ago to avoid some issues. An example of issue that
> existed: when you subclass nil, as
> #doesNotUnderstand: is not implemented by default on your proxy, any proxy
> created receiving a message would crash the VM if you had not overridded
> #doesNotUnderstand:. Another example is that when you iterate over memory
> using #nextObject, if the proxy does not answer it you can end with severe
> VM crashes. In these examples I am talking about the expected VM behavior
> and not about bugs.
>
>
Marea (kind of extended Ghost proxies) proxies deal with object listing. If
you load Marea code, see class side of #MARAbstractProxy (#allInstances,
#allInstancesDo: etc).




> So basically the purpose of ProtoObject was to limit the number of VM
> crashes when playing with proxies / ProtoObjects, instead having a default
> behavior for several messages such as #doesNotUnderstand: or nextObject.
>
> Note that the IDE support for ProtoObject is limited as ProtoObject API is
> very restricted so it does not have methods such as #inspect, ... That's
> also on purpose because Proxies may not implement introspection methods.
>
>
Yes. Ghost proxies provided debugger facilities (printing, inspecting,
debugging, exploring, etc) which could be dynamically either enabled or
disabled. If enabled, you could debug proxies without intercepting the
"debugging" methods.


>
>
>
>
> 2015-03-31 14:53 GMT-07:00 Sean P. DeNigris <s...@clipperadams.com>:
>
> Denis Kudriashov wrote
>> > http://smalltalkhub.com/#!/~CAR/Ghost/ or
>> http://ss3.gemstone.com/ss/Ghost
>>
>> Thanks, Denis! I'll check it out. I'm not sure which repo either.
>> Mariano's
>> commits are all in both places, but there seems to be some parallel
>> development after that...
>>
>>
>>
>> -----
>> Cheers,
>> Sean
>> --
>> View this message in context:
>> http://forum.world.st/Proxies-Subclassing-nil-tp4816443p4816503.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>


-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to