On Wed, Sep 11, 2019 at 4:10 AM ducasse <steph...@netcourrier.com> wrote:

>
>
> > On 11 Sep 2019, at 04:07, James Foster <smallt...@jgfoster.net> wrote:
> >
> > 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 think that I would use ? mainly for unary message
>
> Now I’m sure that if you look carefully some people use
>
>         include
>                 for the action
>         includes
>                 for the tests
>
> I took include as an example and this is super not intention revealing.
>
> >> lineUpBlockBrackets
>
>         lineUpBlockBrackets?
>         Now I will rewrite them all as shouldLineUpBlockBrackets or
> isLineUpBlockBrackets and to me for unary message ? makes it a lot better.
>
>
Hi Stef,

I have been facing this ambiguity a lot too. And my workaround, most of the
times, was also to prefer the "question" method with #should. #is just
doesn't sound right in my cases, but #should does sound good in most of
them. I would still like to find a better one, but for the moment, in my
recent years, I am stuck with #should.

-- 
Mariano Martinez Peck
Email: marianop...@gmail.com
Twitter: @MartinezPeck
LinkedIn: www.linkedin.com/in/mariano-martinez-peck
<https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/>
Blog: https://marianopeck.wordpress.com/

Reply via email to