[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using empty $(else) variable for readability
From: |
Rakesh Sharma |
Subject: |
Re: Using empty $(else) variable for readability |
Date: |
Sat, 17 Oct 2015 14:12:15 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Tony Theodore <tony.t <at> me.com> writes:
>
> When there is an `else` in a complex section, it sometimes looks like:
>
> $(if <condition>, \
> <do something> \
> , \
> <do something else>)
>
> These can be deeply nested and the dangling `, \` can get really hard to
parse. Constructs like:
>
> $(if <condition>, \
> <do something> \
> $(else), \
> <do something else>)
>
> help readability and seem to work. I know I can use any misspelling or
mangling of `else`, or something like
> $(otherwise), but `else` is really easy to read and parse.
>
> Is this a reasonable idea and is there any chance $(else) will have some
defined value in the future?
>
This is not at all a good idea, since it's very easy in make to slip in
a variable $(else) whose value whenever it's non-null will cause your
carefully constructed clauses to come crashing down.
--Rakesh