A code style question

Ben Rubinstein benr_mc at cogapp.com
Wed Jan 21 10:15:11 EST 2015


On 21/01/2015 01:58, J. Landman Gay wrote:
> On 1/20/2015 7:33 PM, Geoff Canyon wrote:
>> The nested if statements in the first
>> one, and the duplicated
>>
>>      set the baseID of this stack to "this card"
>>
>> offend my eye.
>
> There's two of us then.

Me three.

Also I was glad to see you also have a reflex of defining

> function iff X,T,F
>    if X then return T else return F
> end iff

(I usually name my version "ifthenelse" - I like the conciseness of yours, but 
I studied logic some decades ago, so for me "iff" is already a word, and it 
means something different - if and only if.)

I don't we think should be proposing fundamental additions to the language 
very often, but this is such a useful one that I think it should be considered.

What do you think?

Ben





More information about the use-livecode mailing list