[squeak-dev] Re: Is there a preference setting to block automatic parentheses?

Tobias Pape Das.Linux at gmx.de
Tue Feb 24 10:21:48 UTC 2015


On 24.02.2015, at 10:32, Eliot Miranda <eliot.miranda at gmail.com> wrote:

> On Feb 23, 2015, at 7:25 PM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> 
>> (moving to squeak-dev)
>> 
>>> On 22.02.2015, at 14:40, Chris Muller <asqueaker at gmail.com> wrote:
>>> 
>>>>> 
>>>>> This implmenentation is not the best. The one in E/OCompletion is better.
>>>> 
>>>> I love the feature (in other editors), but hate its current behavior.  If that one is better, why don't we use that?
>>> 
>>> This preference is part of the low-level interface which affects the
>>> overall fidelity of the Squeak user-experience.  If we are going to
>>> make any changes to this, may we please start it out in the Inbox
>> 
>> The onus is actually on whoever enabled this feature by default before it was mature, IMNSHO. Until we fix it properly (see below) we need to turn it off.
>> 
>>> where we can all try it and discuss it in more objective terms than
>>> "love", "hate", "better" and "horrible"?
>> 
>> "Horrible" is a technically accurate description in this case ;)
>> 
>> Because it interferes with the user's wishes. It gets in the way unless you consciously anticipate how it's going to mess with what you type. And it doesn't have to, as other editors clearly demonstrate.
>> 
>> If I am blindly typing
>>   (foo)
>> I expect to end up with
>>   (foo) 
>> 
>> In current Squeak I end up with 
>>   (foo))
>> which is clearly wrong and extremely annoying and makes me hate the feature.
>> 
>> For an editor that gets it right, try ACE online ( http://ace.c9.io/ ). If an editor does auto-insertion, it *must* keep track of that and anticipate the user typing the corresponding characters. E.g. in ACE I can type
>>   [('foo
>> and get 
>>   [('foo')]
>> but then I can proceed to type
>>         ')]
>> end it will just skip over the auto-inserted part. Similarly in Squeak when typing
>>   [(2)+(3)]
>> it results in
>>   [(2)+(3)]))]
>> but in ACE it gets me
>>   [(2)+(3)]
>> which is so obviously right I'm not even sure how anyone could argue Squeak's is not horribly broken.
> 
> +1.  Hate is not too strong a word.  Horribly broken is accurate.  

+1

I am constantly annoyed by code that looks like

  ()self foo: bar

(because I more often edit than write forward)


> Given that Smalltalk has had control-enclose for decades that is useful and predictable we don't need something poorly engineered.

However, this is less approachable. 
I figured that out when I was already using Squeak for 5 years.
  I for one would like "delimiter character"[1] to just behave like
auto-enclose if (and only if) there is a text selection


>  Can we either get it right or get rid of it, please?
> 


Best
	-Tobias



[1]: my list of these (to not forget them)
 [], {}, (), <> (and >< too), "", '', ``
more esotheric
 || (helpful for temps)
  _ _, * *, = =, # #, + + (helpful for emphasis in comments)
and probably (a little harder)
 “”, ‘’, „“, «» (or »«), ‹› (or ›‹)


More information about the Squeak-dev mailing list