[Pharo-dev] SuffixConditionals

Sean P. DeNigris sean at clipperadams.com
Wed Apr 30 08:29:09 EDT 2014


Torsten Bergmann wrote
> SuffixConditionals adds #if: and #unless methods to BlockClosure.
> Currently in VisualWorks but can be ported to other Smalltalks (like
> Pharo) as well.

Good idea! It is MIT and would be a great bridge for a Ruby community in the
spirit of
http://forum.world.st/a-Pharo-talk-from-a-ruby-conference-tp4756805p4757055.html
:
FAQ
Q: ifTrue: and ifFalse: look weird to me. Why can't I have more readable
control flow statements like Ruby?
A: You can! Simply load SuffixConditionals from the Configuration Browser
and you can write things like:
    [process stop] if: process isRunning
    and
    [process start] unless: process isRunning

Also would be a great answer when this inevitably comes up in the endless
"why isn't Smalltalk as popular as Ruby" conversations
(http://stackoverflow.com/a/438986/424245)



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/SuffixConditionals-tp4757183p4757212.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.




More information about the Pharo-dev mailing list