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
> C compilers (Visual C++ is not included in that category) give warnings
> 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
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.