[Top][All Lists]

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

[bug #52209] Support for ifeq function

From: Sam Kendall
Subject: [bug #52209] Support for ifeq function
Date: Mon, 23 Jan 2023 11:17:11 -0500 (EST)

Follow-up Comment #5, bug #52209 (project make):

I strongly agree with the need but suggest a different syntax:

$(eq lhs,rhs)
$(neq lhs,rhs)

Each function expands lhs and rhs. If the results are identical or
nonidentical, respectively, the function expands to T. Otherwise, it expands
to empty.

The rationale is that this syntax is more readable than the proposed $(ifeq
lhs,rhs,1). For me, readability trumps the slight burden of committing to a
particular "true" string. (I've suggested T, following the GMSL, but it
doesn't matter much; I'm okay with 1.)

Function-heavy code is sometimes necessary, but I find it difficult to read.
String equality primitives will help, but let's make them as concise and
readable as possible.

One more issue: should string equality functions be bug-for-bug compatible
with bug #59584? I would say no; they should be consistent with what functions
normally do, which I think is to trim whitespace to the left of each argument
before expansion.


Reply to this item at:


Message sent via Savannah

reply via email to

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