LLVM talks 1: Clang for Chromium

bearophile bearophileHUGS at lycos.com
Fri Dec 16 10:16:49 PST 2011


Walter:

> > Given the frequence of bugs caused by the ?: operator, I think something like this will be good to have in D too.
> 
> I haven't seen the "bug every time" with this.

Surely it's not a bug every time (but maybe was often enough a bug in the Chromium project, that is several millions lines of code). But in articles about PVS-Studio, and elsewhere, I have seen several cases where code like x+b?y:0 was a bug in good and real code. But I don't yet know how common those problems are. I will study some more on this.


>D2 intends to define the order of evaluation of function arguments as strictly left-to-right. There are some problems implementing this, but that's where we want to go with it.<

Good.

There is also the problem of code like this, that will require one or more solutions for D2. Defining or refusing or this kind of code are the possibilities (or both of such solutions, in different situations):
x = x++;

Thank you for your answers,
bearophile


More information about the Digitalmars-d mailing list