[squeak-dev] The Inbox: Morphic-ct.1586.mcz

Jakob Reschke jakres+squeak at gmail.com
Sun Apr 25 17:47:29 UTC 2021


You could also conduct/enforce an informal user study by just changing
the decision in Trunk after a few months, and count the number of
complaints before and after. ;-)

Am So., 25. Apr. 2021 um 19:43 Uhr schrieb Jakob Reschke
<jakres+squeak at gmail.com>:
>
> Hi all,
>
> So visual consistency for Christoph means: all results are
> highlighted(/click-inspectable).
> Whereas for Marcel it means: all complex/interesting results are
> highlighted/click-inspectable.
>
> What does everyone else think about this?
>
> I sometimes wish that the print-it results in the workspace would be
> treated differently than the text that I typed myself. Highlighting
> them (link or otherwise) could help to spot the frontier between
> expression and result after some more actions, but would otherwise not
> help me much. When I intended to use the printed result in my next
> expression, highlighting it as a result would be inappropriate, but I
> rarely ever want to do this. For most complex objects, this is not
> even possible because their print strings are not Smalltalk
> expressions. But I cannot use a non-Smalltalk expression with a link
> on it in my next expression either, so the feature does not help me in
> that case anyway. (What I would rather need is a "put this into a
> variable" command, kind of a refactoring operation for the Workspace.)
> If I wanted to send further messages to a returned 'String' I would
> most likely move it onto its own line for convenient Cmd-p/i first
> anyway, I would not keep it to the right of the expression that
> evaluated to the 'String'.
>
> With this reasoning, I would rather lean towards Christoph's
> interpretation now. (Also I believe it does not hurt so much if one
> can also inspect the primitive results.) But I have not used the
> feature in practice so far, so I will let some time pass for now.
>
> Kind regards,
> Jakob
>
> Am Sa., 24. Apr. 2021 um 17:43 Uhr schrieb Marcel Taeumel
> <marcel.taeumel at hpi.de>:
> >
> > Hi Jakob,
> >
> > thanks for summarizing our arguments. :-) I would rather try to avoid another preference just to configure this preference. ;-) Maybe we can keep the uniform appearance for clickable text actions. I am surprised that DoItActions look different.
> >
> > Hey Christoph,
> >
> > a simple list of exclusions is not complex. Especially since it reflects stable language (and system) properties. I do appreciate your onward pursue of "perfect consistency." However, the system is full of trade-offs because it serves a rather broad audience.
> >
> > I am also in favor of visual consistency for this feature. By only showing it for actually interesting object structures, we actually achieve consistency for those structures. Having it also for primitives would spoil the usefulness of this feature. People might think they found something interesting -- to then be disappointed that it is just a flat string.
> >
> > Optimizing this feature for MCVersionName?! A domain-specific subclass of String? Well, I consider this design rather unfortunate. In such a case, on might be better of to favor composition over inheritance. That's an anti-pattern. Please do not do that in your projects. :-) ... I suspect an optimization for a database ... not sure. Chris?
> >
> > Hi all,
> >
> > here is again the list of objects I think we should exclude from having a text action on their print-it result:
> >
> > ByteString
> > ByteSymbol
> > Number
> > Boolean
> > UndefinedObject
> >
> > If you find concrete arguments (and examples) against elements on this list, please step forward and name them. :-)
> >
> > Reducing visual clutter is worth a few lines of extra source code.
> >
> > Best,
> > Marcel
> >
> > Am 24.04.2021 15:42:08 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
> >
> > Hi Jakob, Hi Marcel,
> >
> >
> > thank you for reviving this discussion! :-)
> >
> >
> > > Christoph, when you inspect your MCVersionNames, do you already know that these are version names or do you inspect them to find out what they are? ("What is this, a String or an MCVersionName?")
> >
> >
> > Definitively also the latter.
> >
> > > While the type check might not be really necessary, avoiding visual clutter can be a good thing.
> >
> > -1 from my side here. :-) I see little value in adding complexity - and possibly confusion - in order to "simplify" the appearance - in my opinion, the clutter would become even larger if in some cases, the result is blue, and in other cases, it isn't. I would rank (visual) consistency the highest here. We are introducing an additional classification here ("is primitive/is literal/is non-sense?") that is non-trivial as we can see from this discussion, and such heuristics feels a little bit like "too much AI" for a general-purpose system like Squeak/Smalltalk, at least to me.
> >
> > > How about allowing to turn off the highlighting of the result? I mean, make it still clickable, but do not paint it blue.
> >
> > This might be a trade-off for me, but on the other hand, the logic is still cluttered. And the explorability is impeded ...
> >
> > Best,
> > Christoph
> >
> > ________________________________
> > Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <jakres+squeak at gmail.com>
> > Gesendet: Samstag, 24. April 2021 11:43:06
> > An: The general-purpose Squeak developers list
> > Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1586.mcz
> >
> > Hi Christoph, hi Marcel,
> >
> > Am Di., 20. Apr. 2021 um 08:58 Uhr schrieb Marcel Taeumel
> > <marcel.taeumel at hpi.de>:
> > >
> > > Hi Christoph,
> > >
> > > > [...]  subclasses of ByteString can be indeed non-trivial. This applies to MCVersionName, for example
> > >
> > > You are mixing up object structure with structured information. The latter needs interpretation by some other means. Squeak's inspector cannot provide such means of interpretation such as for URLs in strings.
> > >
> >
> > I am struggling to understand how your arguments address each other
> > person's concerns. Did I understand your points correctly:
> >
> > - Christoph wants to get rid of the type check. He argues that
> > sometimes even for the objects with "primitive" structure you may want
> > to get the link. For example, MCVersionName loses its type information
> > when printed, so when you would inspect the result, you would get a
> > String instead of an MCVersionName. The other example is when you want
> > to track identity. Indeed, sometimes it is useful to check whether one
> > String is the same as another one retrieved (inspected) from somewhere
> > else. I do this regularly in Squot when debugging the capturing and
> > materialization (although seldom for Strings at this time because for
> > these it already works as expected).
> >
> > - Marcel says that the links are unnecessary for what are essentially
> > value objects that are not complex enough to need inspection beyond
> > just looking at the print string. Supposedly, one can just reevaluate
> > the result or the expression. Adding the links there produces visual
> > clutter and is distracting. Inspecting an MCVersionName would reveal
> > no further information about the object than the print string does
> > (that is, except for the type!).
> >
> > Christoph, when you inspect your MCVersionNames, do you already know
> > that these are version names or do you inspect them to find out what
> > they are? ("What is this, a String or an MCVersionName?")
> >
> > I fully agree with Marcel on the immediates and singletons (true,
> > false, nil, Symbols). While the type check might not be really
> > necessary, avoiding visual clutter can be a good thing. Tradeoff is
> > with having the special case in the code.
> >
> > Unfortunately(?), Strings in Squeak/Smalltalk are not quite value
> > objects, since they are mutable, can be used as buffers, etc. Depends
> > on the application.
> >
> > On the other hand, Points are mostly used as value objects, but did
> > not get the special case treatment. Though strictly, technically
> > speaking, they are not different from Strings in this regard.
> >
> > Inspecting the result string or the revaluating the original
> > expression to do so is only safe if it does not provoke side effects.
> > For Marcel's selection of classes, there are no side effects of
> > reevaluating the result string. But reevaluating the original
> > expression might not be free of side effects. I guess you would not
> > reevaluate the expression to inspect an immediate or singleton, but
> > for those objects that do have object identity, such as Strings, or
> > where the type of the result is not obvious, MCVersionName, you might
> > want to do that.
> >
> > How about allowing to turn off the highlighting of the result? I mean,
> > make it still clickable, but do not paint it blue. Then there would be
> > no visual clutter, and if you know that the feature is there (and you
> > have subsequently turned off the preference, for example), you would
> > also not easily forget that you can use it.
> >
> > Kind regards,
> > Jakob
> >
> >


More information about the Squeak-dev mailing list