[Buildroot] [PATCH 07/28] barebox: use = instead of := and re-indent

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Mon Jul 4 22:08:38 UTC 2011


Thomas, All,

On Monday 04 July 2011 23:33:24 Thomas Petazzoni wrote:
> -BAREBOX_VERSION:=2011.05.0
[--SNIP--]
> +BAREBOX_VERSION = 2011.05.0

What is the rationale for using '=' instead of ':='?

Using '=' evaluates the assignemnt every time it is referenced, which can
be a little bit costly when there are tons of them (like in buildroot);
while using ':=' does the evaluation only once, at the time of the
assignment, not evaluation.

I agree that the code should be homogeneous, but I'd think it should be
fast as well. He, if I can get butter, buter's money, and a litle smile
from the dairywoman! ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list