help-bash
[Top][All Lists]
Advanced

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

Re: >= and <= for string comparison


From: Peng Yu
Subject: Re: >= and <= for string comparison
Date: Fri, 20 Jan 2023 08:05:05 -0600

On 1/19/23, Chet Ramey <chet.ramey@case.edu> wrote:
> On 1/19/23 9:10 AM, Peng Yu wrote:
>
>> Given the fact that string comparisons are allowed by bash, anybody
>> should legitimately use string comparisons less-then and greater-then
>> if available.
>
> This is a gold-medal-winning leap in logic. Of course everyone can use a
> feature if it's available. It doesn't say anything about a cost-benefit
> analysis of a feature *you want someone else to implement for you*. You
> actually have to convince someone else (more than likely me) to do the
> work. How do you think this is advancing that? You can't rely on the
> `obvious merit' of your proposal if you can't explain that.
>
>> Even if I don't use it, can you prove that others will
>> never need it, given there are many things that can be done with
>> string comparisons?
>
> Did you really ask someone to prove a negative? And then try to use it as
> an argument?

The real problem is as Seth stated "bash is somewhat constrained by
implementing a language that's descended from (and backwards
compatible with) the Bourne Shell,"

I think this is a fair statement. The question is whether we want to
live in "irregularities, idiosyncrasies, or apparent inconsistencies"
forever. Or we want to take the chance to improve it gradually. I
don't think that there is something preventing people to make it less
"irregularities, idiosyncrasies, or apparent inconsistencies".

Instead of arguing why it should stay as is, why not provide an
estimate on how long it would be implemented? I don't know enough
details to have a very accurate time estimate. I think that only you
are in the best position to provide a relatively accurate time
estimate.

>> If you can not prove it, then my specific
>> applications really do not matter for the discussion of whether <= >=
>> should be introduced.
>
> See, that's backward. If you want someone to invest the time and effort in
> implementation and maintenance, you want to at a minimum justify it in a
> way that will convince that someone.

The argument that arithmetic and string operators are not the same has
already convinced someone, if not everyone, that this could be added,
as evidenced by the messages in this thread.

-- 
Regards,
Peng



reply via email to

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