Re: [PATCH v2 3/6] sha1_name: avoid Yoda conditions

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2 3/6] sha1_name: avoid Yoda conditions

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:05

What is a Yoda condition?

Re: [PATCH v2 3/6] sha1_name: avoid Yoda conditions

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:57:05

On Tue, Apr 30, 2013 at 5:00 PM, Junio C Hamano [off-list ref] wrote:
What is a Yoda condition?
---
Using if (constant == variable) instead of if (variable == constant),
like if (4 == foo).

Because it's like saying "if blue is the sky" or "if tall is the man".
---

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help