automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sub conditionals_true_when (@@) [PATCH]


From: Richard Boulton
Subject: Re: sub conditionals_true_when (@@) [PATCH]
Date: Fri, 15 Jun 2001 11:16:56 +0100
User-agent: Mutt/1.2.5i

On Thu, Jun 14, 2001 at 05:49:35PM -0500, Raja R Harinath wrote:
> So, I think it's cleaner to do:
> 
>   1. conditions_true_when(\@@) -- takes a list of conditions and one
>      or more "whens", and returns true when all conditions are true
>      for all whens.
> 
>   2. redundant_condition($@) -- check if the given condition
>      subsumed by any of the whens.
> 
>   3. change 'variable_conditions_reduce' to use 'redundant_condition',
>      along with your modification to look at the tail of @conds too.

Yes, that's much better.

Actually, the main reason I felt it reasonable to change the semantic of
conditionals_true_when() was because of the FIXME: the semantics weren't very
well defined to start with.  Looking at the two uses of
conditionals_true_when() outside variable_conditions_reduce(), it is
always called with an array as the first argument, and a list containing a
single scalar as the second argument.  It therefore seems wise to
change conditionals_true_when to accept only a single WHEN, and to follow
your other suggestions.

The attached patch does this.  All tests behaved as expected with this
patch.

-- 
Richard

Attachment: patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]