help-make
[Top][All Lists]
Advanced

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

Re: Is there any value in a lisp-like $(cond ...) function?


From: J.T. Conklin
Subject: Re: Is there any value in a lisp-like $(cond ...) function?
Date: Thu, 16 Dec 2010 14:38:40 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, berkeley-unix)

Sam Ravnborg <address@hidden> writes:
> On Wed, Dec 15, 2010 at 10:47:14PM -0800, J.T. Conklin wrote:
>> PS: And if I've totally missed a better idiom for this task, please
>> let me know.
>
> I have used the following method in several cases:
>
> do-foo := ${RESULTS1}
> do-bar := ${RESULTS2}
> do-baz := ${RESULTS3}
>
> t:
>       $(do-$(FOO))
>
> With a little exta effort you have your else part covered too.

Thanks Sam.  

I didn't mention this, but I do use and prefer this for simple cases.
My actual use case has nested case statements, with many cases being
patterns/globs.  I attempted breaking it down, but it started looking
like overly abstracted object oriented code (where each class/method
does just one thing and you can't see the big picture).

    --jtc

-- 
J.T. Conklin



reply via email to

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