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

Donald Johnson kandiyohi.snow at gmail.com
Tue Aug 6 10:38:33 PDT 2019


Correct me if I'm wrong, but you could just add the selectors so the
parentheses aren't needed, no?  I did that in my instance and it works
like a charm, like:

    is: aSymbol ifFalse: aBlock ifTrue: aBlock2

    is: aSymbol ifTrue: aBlock ifFalse: aBlock2

    is: aSymbol ifTrue: aBlock

    is: aSymbol ifFalse: aBlock

~Donald Johnson

On Tue, Aug 6, 2019 at 6:54 AM Juan Vuletich via Cuis-dev
<cuis-dev at lists.cuis.st> 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?
>
> Thanks,
>
> --
> 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
> @JuanVuletich
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev


More information about the Cuis-dev mailing list