[Cuis-dev] I think i found a bug in the debugger

Gerald Klix cuis.01 at klix.ch
Sat Aug 7 08:20:57 PDT 2021



On 8/7/21 2:21 PM, Nicola Mingotti via Cuis-dev wrote:
> 
> 
> 
> On 8/7/21 1:35 PM, Hernan Wilkinson wrote:
>> Hi Nicola,
>>  I'm sorry! I misunderstood your email! I read the subject with the 
>> word "bug" and then went directly to the image you pasted and I 
>> thought "it is not a bug, it is how it is intended to work" :-)
> No problem ;)
> 
>>  I agree that on this example, it would be better to see 'nil' than 
>> just nil because it is confusing but for sure there is a reason not to 
>> do it that way... I mean, Smalltalk is a mature system and for sure 
>> there is a reason for showing strings that way, sadly I do not 
>> know/recall that reason.
>>  Anyway, it is not a bug. It would be interesting to see the behavior 
>> of the change Gerald suggested... maybe the reason for that "if" was 
>> only "performance" (why create a new string if we already have one) 
>> and if so, changing that behaviour would be an improvement from the UI 
>> point of view as you suggested.
>>
>>  Cheers!
>>  Hernan
> 
> For the moment I leave to you, Gerald and other experienced programmers 
> further considerations.
> I can't see a very strong reason to display things that way in the 
> debugger ... still, i am a novice.
Mee too! Especially because there is a special case for strings;
implemented in a strange way, one might say.
I still wonder whether `(selectedValue is: #String)`
yields a different result than `selectedValue isString`.
In my image there are three versions of the method,
two older ones by Andres Valloud and one by one 'jpb',
who is not in the list of known authors.
Andres introduced the special case for strings in May/20.
Maybe he is willing to tell us his reasons.

I like to add that I once had a similar problems as Nicola:
I looked at number in the inspector. which did not respond
to arithmetic messages. It took me some time until it
dawned to me that it was actually a string.

But nevertheless, I would love to hear the reasons behind
this design decision to special case strings
in the inspectors display, before we change everything back.
> 
> I prefer not to patch the core and diverge from master for the moment. 
> Maybe in 1 months or so.
> Reason is, when I post to the list i want to be 100% sure you see what i 
> see.

Ah and while I am ranting, one other remark:

Method documentation comments and comments in the code for
design decisions would be great, especially in Cuis' core.

If you think a lengthy comment makes the code less readable,
add a link to Cuis' wiki and document the problem there.
(OK I also did add a comment about the special case,
so 'Asche auf mein Haupt')


Just my two Cent,

Gerald


More information about the Cuis-dev mailing list