[Cuis-dev] Poll: ? instead of is: ?
Phil B
pbpublist at gmail.com
Tue Aug 6 07:48:08 PDT 2019
While I can understand why you like it, I'm not in favor of the #? idea.
It introduces some idiosyncratic syntax to save a couple of parens that
doesn't 'feel' natural to me. Probably related is that given the way
other languages use ?, my default expectation is for the LHS to evaluate to
a boolean.[1] So for me, I'd want a stronger reason to use #? than as
syntactic sugar.
[1] OMeta also uses #? this way
On Tue, Aug 6, 2019 at 7: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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190806/96fe4619/attachment.htm>
More information about the Cuis-dev
mailing list