[Cuis-dev] Parser gets confused when using $| in binary selectors

Juan Vuletich JuanVuletich at zoho.com
Fri May 13 13:42:20 PDT 2022


Updated version is attached.

Hilaire, please check that the use of Preference NG is reasonable.

Folks, please check that the names and default I used make sense.

On 5/13/2022 5:14 PM, Hernan Wilkinson via Cuis-dev wrote:
> The only concern I have with this is that I do not think that using 
> preferences for the syntax of the language is a good idea... it will 
> make incompatible cuis code depending on how the preference is set... 
> I do not have a better solution (only the one I suggested earlier :-) 
> ), so I do not have a strong opinion against it, I do not like the 
> idea but I can live with it and see how it goes.
>
> Hernan.
>

Let's hope that whoever modifies that preference knows what they are doing.
For example for loading code for Pharo. In that case, the default 
behavior will break stuff.
Shortly, I'll try all packages in the Cuis-Smalltalk github organization 
with the preference at #disabled, to find and fix existing code that 
would break in such case.

Besides, I suggest having it at #disabled when writing code, to avoid 
unneeded suffering in the future.

Thanks,


>
> On Fri, May 13, 2022 at 4:41 PM Juan Vuletich via Cuis-dev 
> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>
>     Better names for the preferences could be #disabled, #st80,
>     #ansiSmalltalk.
>
>     Default could be #st80 (meaning `1 at -2` answers the same Point as
>     `1 @ (-2)`.
>
>     If nobody disagrees strongly, I guess I'll push it like that,
>     using Hilaire's new PreferenceNG.
>
>     Thanks!
>
>     On 5/13/2022 3:32 PM, Juan Vuletich via Cuis-dev wrote:
>>     On 5/13/2022 1:41 PM, Nicolas Cellier via Cuis-dev wrote:
>>>     So we did not have to introduce the @- selectors & co...
>>>
>>
>>     Given the path followed by Squeak and Pharo, and what ANSI
>>     Smalltalk says, and the preferences several of you just said, the
>>     attach is my proposal.
>>
>>     It adds a new preference #atMinusDigitMeaning. Possible values
>>     are: #disabled, #negativeNumberParameter and #atMinusSelector. It
>>     doesn't only control '@-', but any binary selector ending in $-,
>>     with size > 1.
>>
>>     The question is what to use as a default value.
>>     ST-80 and Squeak go with #negativeNumberParameter.
>>     ANSI Smalltalk and Pharo do #atMinusSelector.
>>     #disabled is also a reasonable alternative, helping programmers
>>     understand a smell in their code.
>>
>>     Thanks,
>>     -- 
>>     Juan Vuletich  <http://www.cuis-smalltalk.org>
>

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
https://twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220513/43acda16/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 5161-AtMinusDigit-inSmalltalkCode-JuanVuletich-2022May13-17h15m-jmv.001.cs.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220513/43acda16/attachment.ksh>


More information about the Cuis-dev mailing list