[squeak-dev] The Inbox: ShoutCore-nice.63.mcz

Levente Uzonyi leves at caesar.elte.hu
Thu Jul 18 22:19:25 UTC 2019


On Thu, 11 Apr 2019, Levente Uzonyi wrote:

> On Sun, 7 Apr 2019, Nicolas Cellier wrote:
>
>> 
>> <rant>
>> I find this Shout Parser selector particularly misleading...
>> It's hard to guess that #isSelectorCharacter:  is going to check 
>> exclusively for binary selectors before I browse the implementation 
>> details.
>> Should it be named #isBinarySelectorCharacter:, I could eventually omit 
>> such browsing.
>> 
>> In a lesser way, I also do not like self isName, self isBinary, self 
>> isKeyword,...
>> The intention is to check for the currentToken, not self.
>> They have the advantage of being short, but reading the code gives a 
>> strange taste.
>> If I wanted to avoid the heavy isCurrentTokenAName, 
>> isCurrenTokenABinarySelector, isCurrentTokenAKeyword, ... maybe I would 
>> just use has instead of is?
>> 
>> I've also ran the Shout Parser through a Debugger, and I encountered a lot 
>> of redundancy during the tokens scan (those isName isKeyword... are ran 
>> several consecutive times).
>
> I started rewriting these methods. I'll push the changes to the inbox as soon 
> as I'm happy with them.

It took a bit longer than I expected and it grew a lot larger as well but 
it's finally in the inbox as ShoutCore-ul.66. You'll have to load 
Collections-ul.844 before that. Some tests needed adjustments which are 
included in ShoutTests-ul.29.

Levente


More information about the Squeak-dev mailing list