Marc, I'm not sure if you're arguing for or against nullptr :-)... On 2015-02-10 18:23, Marc Mutz wrote: > On Tuesday 10 February 2015 20:13:12 André Pönitz wrote: >> Can't you simply wait until 'nullptr' is available? > > No. > > For a simple reason: using nullptr (Q_ or not) is more expressive than 0. And > why would i want to throw away information I already have?
(Oh... and 'auto ptr = 0;' does not give you a pointer. Not relevant to Qt, but just saying...) >> Do you really *need* to use macros instead of the core language? > > Do you use 'emit' when you emit signals? Lemme tell you: It's a pesky macro > and it just adds line noise. I do use 'emit'. It adds information, not noise. When I see 'emit', I know that I am emitting a signal and not just calling some method. I can also search my code for 'emit'. (Searching for signal emissions is very hard if I am not using 'emit'.) Similarly, if for some reason I need to know where a null pointer occurs, I can at least search for 'nullptr' and know I will not get false positives. Try that with '0' and you will get *LOTS* of false positives. (I may not find all of them, but the ones I'd miss, I'd miss regardless of using '0' or 'nullptr'.) -- Matthew _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development