Would use of ? and ! in unary/keyword selectors be convention or somehow required? If simply convention, then we should start with renaming testing methods to be named is* or has*. flag1 := anInteger even. ânot good" flag2 := anInteger isEven. âbetter" flag3 := anInteger even?. âhow much better?â flag4 := #(1 2 3) includes?: 2. âhow much better?" Iâm not convinced that having another way to indicate a testing method will help if people still donât name methods well. Also, can you give an example of where ! would clarify the meaning? Are you thinking of the following: myPoint x!: 3. myArray at: 1 put!: nil. Those donât seem to be much improved! Iâm not arguing for âcompatibility" or "staying in the past." Iâm just trying to understand the benefit. Thanks, James
On Sep 10, 2019, at 1:14 PM, ducasse <stepharo@netcourrier.com> wrote:
I would love to retract ? and ! from the list of binary selectors. Iâm super super frustrated that predicates cannot be easily identifiable.
for example is lineUpBlockBrackets an action or a testing method.
I think that we are trapped in mistakes from the past. In racket and scheme and I guess ruby too we can use ? in the method and this change the game.
self lineUpBlockBrackets?
We have plenty of binary selector parts that are not used and think that it is frustrating.
Let us check:
Character specialCharacters
'+-/\*~<>=@,%|&?!·÷±Ã'
+ - / \ ~ <
= @ , & | %
those are ok
I have no idea what is · nor how to type it. ÷ looks from the past. ± so funny à no idea what it is andâ¦.
Then we have two that could really improve our language ? and !
Do not tell me that there is a value in these selectors?
(#(#+ #- #/ #\ #* #~ #< #> #= #@ #, #% #| #& #? #!) combinations select: [ :each | each size = 3 and: [ each includesAnyOf: #(#? #!) ] ]) collect: [ :each | each first, each second, each third ]
#(#'+-?' #'+-!' #'+/?' #'+/!' #'+\?' #'+\!' #'+*?' #'+*!' #'+~?' #'+~!' #'+<?' #'+<!' #'+>?' #'+>!' #'+=?' #'+=!' #'+@?' #'+@!' #'+,?' #'+,!' #'+%?' #'+%!' #'+|?' #'+|!' #'+&?' #'+&!' #'+?!' #'-/?' #'-/!' #'-\?' #'-\!' #'-*?' #'-*!' #'-~?' #'-~!' #'-<?' #'-<!' #'->?' #'->!' #'-=?' #'-=!' #'-@?' #'-@!' #'-,?' #'-,!' #'-%?' #'-%!' #'-|?' #'-|!' #'-&?' #'-&!' #'-?!' #'/\?' #'/\!' #'/*?' #'/*!' #'/~?' #'/~!' #'/<?' #'/<!' #'/>?' #'/>!' #'/=?' #'/=!' #'/@?' #'/@!' #'/,?' #'/,!' #'/%?' #'/%!' #'/|?' #'/|!' #'/&?' #'/&!' #'/?!' #'\*?' #'\*!' #'\~?' #'\~!' #'\<?' #'\<!' #'\>?' #'\>!' #'\=?' #'\=!' #'\@?' #'\@!' #'\,?' #'\,!' #'\%?' #'\%!' #'\|?' #'\|!' #'\&?' #'\&!' #'\?!' #'*~?' #'*~!' #'*<?' #'*<!' #'*>?' #'*>!' #'*=?' #'*=!' #'*@?' #'*@!' #'*,?' #'*,!' #'*%?' #'*%!' #'*|?' #'*|!' #'*&?' #'*&!' #'*?!' #'~<?' #'~<!' #'~>?' #'~>!' #'~=?' #'~=!' #'~@?' #'~@!' #'~,?' #'~,!' #'~%?' #'~%!' #'~|?' #'~|!' #'~&?' #'~&!' #'~?!' #'<>?' #'<>!' #'<=?' #'<=!' #'<@?' #'<@!' #'<,?' #'<,!' #'<%?' #'<%!' #'<|?' #'<|!' #'<&?' #'<&!' #'<?!' #'>=?' #'>=!' #'>@?' #'>@!' #'>,?' #'>,!' #'>%?' #'>%!' #'>|?' #'>|!' #'>&?' #'>&!' #'>?!' #'=@?' #'=@!' #'=,?' #'=,!' #'=%?' #'=%!' #'=|?' #'=|!' #'=&?' #'=&!' #'=?!' #'@,?' #'@,!' #'@%?' #'@%!' #'@|?' #'@|!' #'@&?' #'@&!' #'@?!' #',%?' #',%!' #',|?' #',|!' #',&?' #',&!' #',?!' #'%|?' #'%|!' #'%&?' #'%&!' #'%?!' #'|&?' #'|&!' #'|?!' #'&?!â)
may be this one #&?! is useful for WTF!
And because of that we sacrifice having nice method names! I really think that we should change that.
S.