[squeak-dev] Merge Request: autoEncloseBeforeSpace.cs

Eliot Miranda eliot.miranda at gmail.com
Thu Dec 23 01:04:06 UTC 2021


Hi Christoph,

> On Dec 22, 2021, at 11:59 AM, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
> 
> 
> Hi Eliot,
> 
> 
> 
> > > Please let's not raise a fuss for this in this thread. :-) I'm skeptical about cmd-F/T at all. Smalltalk is a general-purpose language that (thankfully!) does not even have any built-in syntactic overhead for logical constructs such as conditions or loops. Providing such domain-specific shortcuts in the default tooling feels completely wrong to me. Apart from that, we will need to discuss pretty-printers and coding style preferences in a broader context at some later point in time. See also: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-May/215416.html
> 
> > 
> > ?!?! This is a Smalltalk editor we’re talking about and ifTrue:/ifFalse: is an extremely common sequence, in good code.  I find it alarmingly arrogant that you express skepticism about something that has been supported for decades.
> 
> I did *not* request to remove this shortcut because I understand that some long-standing Squeakers might have gotten used to it. My argument was only not to cement this kind of "leaky abstractions". IMHO the editor should be a tool that is suitable for all applications or domains in the same way, without putting advantages or disadvantages to certain domains.

But the editor is explicitly divided into a domain-independent TextEditor and a domain-specific SmalltalkEditor anyway.  So your objection is not relevant.  We’re discussing (I hope) the accelerator keys for the SmalltalkEditor.

> A developer working in another domain (that abstracts from booleans/for instance, a query DSL) will be less likely interested in special shortcuts for ifTrue:/ifFalse: but more likely interested in shortcuts for message sends such as #collect:, #select:, etc. I only wanted to present this perspective before we start occupying even more shortcuts for randomly chosen selectors that might be of increased importance for a subset of users of the Smalltalk workspace.

ifTrue:/ifFalse: are hardly randomly selected selectors, now are they?

> 
> Best,
> Christoph
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Eliot Miranda <eliot.miranda at gmail.com>
> Gesendet: Mittwoch, 22. Dezember 2021 20:49:00
> An: The general-purpose Squeak developers list
> Betreff: Re: [squeak-dev] Merge Request: autoEncloseBeforeSpace.cs
>  
> 
> 
>>> On Dec 22, 2021, at 11:03 AM, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
>>> 
>> 
>> Hi Tim,
>> 
>> 
>> 
>> thanks for the clarification. This (command + bracket) does indeed seem not tto work on Windows (at least for me) neither with the Alt nor with the Command key (handling of the latter is currently buggish at the VM side for win32). To help me to reproduce this, could you maybe send me a screenshot of the keyboard exerciser (in the parts bin tool > demo) after pressing command + bracket and hover the recorded event? :-)
>> 
>> 
>> 
>> > An important point that seems to get forgotten too often is that *typing* some text is a small fraction of the job. *Editing* it will usually occupy much more time, and is typically more fiddly because you have to fairly precisely select text and then operate on it. I'll take improvements to *editing* over improvements on *typing afresh* any day. Anyone that doesn't pretend they get it perfectly correct first time (and they are lying) should prefer it.
>> 
>> 
>> 
>> No objection.
>> 
>> 
>> 
>> > And surely any cmd-T to make an ifTrue should actually insert
>> 
>> 
>> 
>> Please let's not raise a fuss for this in this thread. :-) I'm skeptical about cmd-F/T at all. Smalltalk is a general-purpose language that (thankfully!) does not even have any built-in syntactic overhead for logical constructs such as conditions or loops. Providing such domain-specific shortcuts in the default tooling feels completely wrong to me. Apart from that, we will need to discuss pretty-printers and coding style preferences in a broader context at some later point in time. See also: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-May/215416.html
>> 
> 
> ?!?! This is a Smalltalk editor we’re talking about and ifTrue:/ifFalse: is an extremely common sequence, in good code.  I find it alarmingly arrogant that you express skepticism about something that has been supported for decades.
>> Best,
>> 
>> Christoph
>> 
>> 
>> 
>> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von tim Rowledge <tim at rowledge.org>
>> Gesendet: Mittwoch, 22. Dezember 2021 19:28:02
>> An: The general-purpose Squeak developers list
>> Betreff: Re: [squeak-dev] Merge Request: autoEncloseBeforeSpace.cs
>>  
>> 
>> 
>> > On 2021-12-22, at 10:10 AM, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
>> > 
>> > Or do you actually hit *command* + [ rather than just [? If yes, why? On Windows, command + bracket does not show any effect at all for me.
>> 
>> 
>> Err, yeah; it's only the way we old farts have been doing it for about 40 years. The idea of simply hitting '[' and not getting an actual [ on its own is horrifying. If I want to enclose a block of text I expect to do cmd-[. If I want to remove the [] from an enclosed block I expect to select the text inside the [] and hit cmd-[ ; I'll admit that the idea of using cmd-] to remove has some possible merit and might be enough to make me remember it.
>> 
>> An important point that seems to get forgotten too often is that *typing* some text is a small fraction of the job. *Editing* it will usually occupy much more time, and is typically more fiddly because you have to fairly precisely select text and then operate on it. I'll take improvements to *editing* over improvements on *typing afresh* any day. Anyone that doesn't pretend they get it perfectly correct first time (and they are lying) should prefer it.
>> 
>> And surely any cmd-T to make an ifTrue should actually insert
>> ifTrue:
>>         [
>> anyway? And then maybe cmd-ctl-shift-t with a selection should make it
>> ifTrue:
>>         [previous selection]
>> ??
>> And then clearly cmd-shift-ctl-meta-t should do
>> ifTrue:
>>         [previous selection]
>> ifFalse:
>>         []
>> ?
>> 
>> I mean, let's go the whole emacs while we're at it...
>> 
>> tim
>> --
>> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
>> Strange OpCodes: RBR: Remove Bits Randomly
>> 
>> 
>> 
>> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211222/62216c50/attachment.html>


More information about the Squeak-dev mailing list