[Cuis-dev] Poll: ? instead of is: ?

David T. Lewis lewis at mail.msen.com
Tue Aug 6 16:57:19 PDT 2019


On Tue, Aug 06, 2019 at 08:54:29AM -0300, Juan Vuletich via Cuis-dev wrote:
> Hi Folks,
> 
> One thing I don't like about the #is: message is that being a keyword, 
> it usually requires parenthesis. Today I realized we can use #? instead. 
> So, we could write:
> 
> aForm ? #GrayForm ifTrue: [ self doSomething ].
> 
> instead of
> 
> (aForm is: #GrayForm) ifTrue: [ self doSomething ].
> 
> Do you like it? What do you prefer, #is: or #? ? Reasons for adopting or 
> not adopting it?
> 

I prefer #is: because I find it very readable.

For me, #? is less intuitive because of my exposure to C family languages
that use it for different purposes.

The extra parenthesis does not bother me. It is consistent with the overall
syntax, and I can still read and understand it clearly.

Dave



More information about the Cuis-dev mailing list