A code style question

Geoff Canyon gcanyon at gmail.com
Wed Jan 21 10:53:34 EST 2015


I know iff means in-and-only-if, but I have a habit of taking things that
are not functions and making them into functions by appending an "f" so I
went with it.

I agree that it would be a very useful thing to have -- the obvious
drawback of the way it is now is that both outcomes have to be evaluated,
where in an if statement, obviously, only one of them is.

On Wed, Jan 21, 2015 at 9:15 AM, Ben Rubinstein <benr_mc at cogapp.com> wrote:

> 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
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list