Re: [PATCH 0/4] Re: [PATCH 3/4] t: rev-parse-parents: avoid yoda conditions

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

 



On Sat, Sep 07, 2013 at 10:11:49PM -0500, Felipe Contreras wrote:

> > Though I prefer the current, I can certainly live and adapt to a changed
> > standard, and I do not mind doing so if there is a good reason. But I've
> > yet to see any argument beyond "it is not what I like". Which to me
> > argues for the status quo as the path of least resistance.
> 
> Didn't Junio already provided reasoning?

If the reasoning is "cmp(actual, expect) makes more sense to humans"
then I do not think it is universal. Otherwise why would so many
existing test frameworks do it the other way? And that is why I said it
seems more like an issue of personal preference than a universal truth.

Was there some objective argument made that I missed?

> Here's more; human semantics:
> 
> Computer, compare A with B
> cmp(A, B)
> 
> Why would I write?
> 
> cmp(B, A)
> 
> Could you even construct an English sentence that starts with B, and then A?

"Computer, given that we expect B, how does A differ?". Or "Computer, we
expect B; does A match it?"

Or any number of variations. I'm sure you will say "but those seem
awkward and unlike how I think about it". But that was my point; it
seems to be a matter of preference.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]