[Pharo-dev] SuffixConditionals

Esteban A. Maringolo emaringolo at gmail.com
Wed Apr 30 10:07:27 EDT 2014


Thanks Torsten.

I've been using my own favorite suffix conditional: #haltIfTrue.

Regards!
Esteban A. Maringolo


2014-04-30 10:57 GMT-03:00 Torsten Bergmann <astares at gmx.de>:
> As it is MIT I ported it to Pharo:
>
> Code is available on
> http://smalltalkhub.com/#!/~TorstenBergmann/SuffixConditionals
>
> One can load it from the config browser
>
> Bye
> T.
>
>> Gesendet: Mittwoch, 30. April 2014 um 14:29 Uhr
>> Von: "Sean P. DeNigris" <sean at clipperadams.com>
>> An: pharo-dev at lists.pharo.org
>> Betreff: Re: [Pharo-dev] SuffixConditionals
>>
>> 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