lua-users home
lua-l archive

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


> That's also a bad habit that many C programmers have picked up.  The
better
> C compilers (Visual C++ is not included in that category) give warnings
when
> they come across that kind of syntax.  Sure, technically it's a valid
> construct, but it is not regarded as good programming practise these days.

    This is off topic, but I'll briefly add my 2 cents worth.  You will
probably
agree with my valuation. :))

    I don't regard the  while (var = function()) {} construct as a bad
habit.  I certainly avoid it if the expression being evaluated is complex
and unreadable.  But, it's an expressive and useful way of coding certain
loops.  It is part of the C language, it is simple, and not ambiguous except
to people unfamiliar with C.  It's not something I feel very strongly about,
I just don't understand why anyone would find it difficult or dangerous.