[squeak-dev] The Inbox: Tools-ct.1101.mcz

Chris Muller ma.chris.m at gmail.com
Tue Jan 11 23:51:33 UTC 2022

Hi Christoph,

> I am not sure whether we can (or should) make the default inspector
> proxy-safe. Rather, IMHO the default inspectors should handle
> proxies transparently and display the underlying object.
For inspecting the implementation details of proxies, we have the
> BasicInspector, which is almost completely proxy-safe (the only exception I
> am aware of is a send to #isReadOnlyObject for the window label, for which
> we currently do not have a mirror primitive).
Yes, in principle, it's impossible to argue against that.
"Backward-compatibility" for Magma is all I've got.

> > #size is a provoking message.
> And #printString, #longPrintString, #perform:, #instVarNamed:,
> #basicSize, and all others existing sends are not? :-)
They are, but not invoked until you interact with the Inspector.  Putting
the #size in the title bar changes that behavior.

Also, it may be presumptuous to assume the collection being inspected is a
SmalltalkCollection.  CollectionInspector is used for Magma's large
MagmaCollections, which require a db access to retrieve the size..

> > Magma's Proxy's anyway (which don't use the mirror-primitives but the
> old-school Proxy pattern)
> Just out of interest, how would you implement a proxy using mirror
> primitives? :-)
I'm not sure, but Eliot says it's the way Proxy's are supposed to be done
in Squeak so that ProtoObject can have no methods.

Unfortunately, it would require rewriting a lot of low-level methods like
Symbol>>#=  to be (to my knowledge) non-standard Smalltalk which,
realistically, is not ever going to be done, and therefore I'm doubtful the
dream of "transparent proxies" will ever, uh, materialize (no pun
intended!  :)  ), which is unfortunate because that "dream" continues to be
a Magma-killer (slowly by a thousand cuts).  Magma's Proxy's have worked
well-enough for *applications* for many years, but lately developers seem
to want "clean", "transparent" proxies and so even the standard old-school
Gang-of-Four Proxy pattern remains broken since 5.3.

I hope I'm missing something and completely wrong about the above, but I
don't think I am.  I admit I haven't had the time or inclination to try to
re-inventing Magma's proxy system just to accommodate some abstract notions
of purity.  I'm concerned with application of computer code to external,
real-world purposes.

 - Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220111/ed270485/attachment.html>

More information about the Squeak-dev mailing list