On 05/18/2017 05:15 PM, Steve D'Aprano wrote: > Oh but this is Bart we're talking about. Of course his code generator is > perfect, it is unthinkable that it emits incorrect code.
I think we've picked on Bart enough for one day. Fortunately he seems rather good natured, but this is bordering on the ad hominem in my opinion. Sure Bart's posts often reflect a bit of confrontation in regards to his own programming languages vs Python. But I don't think an attack ("of course his code generator is perfect") is called for. > Since you are ultimately compiling the code in C, those ideas of undefined > behaviour etc do apply. The behaviour of the C compiler doesn't suddenly, > magically, change just because the code was generated by a program in > another language. If <some code> generates warnings because it relies on > undefined behaviour, it is still undefined behaviour regardless of whether > you typed the code yourself or used a code generator. Of course not, and I don't think that was Bart's point at all. He was just pointing out that some of the compiler warnings folks jumped all over in his code stem from the compiler warning that the operator precedence in certain expressions is often not what the programmer wants. But since Bart is aware of the precedence (and that's part of the C standard so there's no undefined behavior there), his generated C expressions can lack parenthesis since they are already are in the correct order of operations. You can argue that this isn't the case if you want, but I see no reason to doubt Bart's word in this thing. Sure he could place parens in the expression to quiet the warning (might be the best bet), but that is redundant and this is clearly a case of a warning that can be ignored. I'm sure you'll claim otherwise, but nevertheless this appears to be the case for this particular warning. This was Bart's point but you and others have taken it far beyond that and criticized him beyond what was reasonable. -- https://mail.python.org/mailman/listinfo/python-list