--nextPart2840641.CqANhJCd9T Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Tuesday, October 05, 2010 14:21:58 Lubos Lunak wrote: > On Tuesday 05 of October 2010, Michael Pyne wrote: > > On Monday, October 04, 2010 17:55:30 Lubos Lunak wrote: > > > On Monday 04 of October 2010, George Kiagiadakis wrote: > > > > I think source compatibility is easier to maintain because it is > > > > more > > > > obvious when you break it and people generally understand it > > > > better > > > > than binary compatibility. I don't think we have a problem > > > > keeping > > > > source compatibility atm, do we? > > > > > > We occassionally do (I e.g. remember fixing a bug somewhen in the > > > past > > > > > > that had been introduced by broken source compatibility and people > > > thinking 0 is a null pointer). > > > > Are you referring to 0 in C, or in C++? I ask only because 0 really *is* > > the C++ null pointer (or at least, the only way of convincing the C++ > > compiler to use whatever the actual null pointer is), at least until > > C++0x's nullptr addition gets better supported. > > > > The catch is that conversion from 0 to "real null pointer" only happens > > for pointer types, so if int is also possible, C++ is perfectly happy > > to not perform the conversion. > > Thanks for saving me the work of refuting your first paragraph by doing so > in your second paragraph :). Well my second paragraph explains why what I explained in my first paragraph sucks, but it doesn't change any facts in the first paragraph. As far as C++ the language is concerned, 0 is as close to the null pointer as you're going to get, and to argue otherwise is kind of disingenuous in my opinion. Bjarne Stroustrup explains the current status of the C++ null pointer in his paper [1] trying to get a null pointer added to C++ that doesn't suck. The platform hardware or ABI may certainly disagree with the null pointer being 0, and that can be important if you're writing clang or GCC but from a C++ programmers' point of view, 0 really is the null pointer. > And note that at least with gcc NULL already > is nullptr in practice. That's a good point, and a good reason that most of us should just be preferring NULL anyways. I'm already sick of 0's dual hat as pointer and int ;) [1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf Regards, - Michael Pyne --nextPart2840641.CqANhJCd9T Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iQIcBAABCAAGBQJMq8t4AAoJEAuvDJx7auny93AP/R4+Ef7RhVJ4AShyXXCuA3Ko /MtTvfEi+9lI3u0NRRbQjFYhngYc3RwMSYbB6bVRFY2SlOeG61hPh2qN/mviGebo kE4onFCRoQEYiAJkA9vgiE0nEIDU7F1cwpNiIw5iCnFuOL+xHq6IOfPBNMvIH7lO fec4lc9d4bHccpgfMEbtQGtuvlUAdl9GxdE3u4yDmxIeTmlp/qaixffKJq0ieme8 trw5a4WaqaqXVqFAsuKrt+XC93yXWfetTJZe2UjR2tcTKVk9awNPpCHlYWipsao8 sXjRZdB7a9WVIyg4ILncNQDa/lFLd49mG6Ap2TJWUBPAyJeyEuSSv5ZXXy74LH1y XMG8btOImE1vVwElcbq+hPkj860XJCSibOlptPxJ1JRfWszydDi7XXb+BKtW3UyH 7OnfxKCSjn6Jw7czDVRQM+D06L/hE2Q+lYdltZw3dvAmJU+b8l76CntAg/6ca9y+ G0rb7bzaoDAO3LGIizuvaGZcTdTYnGVRJxFhZqKxnNwFxOdbqHLnK/SBafLy5ffu kI5EJVvS++Z2v7j2djjXQIRfJdwtlLkXiYOZEFC/h4DmLztM8iK6C2BsgQ9Ktyha BTRrkUW6ALtQZ7a399OwvxpcL1RBb9X5ZwHv3eo7/QO554WUtawx34SGoqBXsXJL +z5sZfwFzhuDk2Q2kq3v =5CrY -----END PGP SIGNATURE----- --nextPart2840641.CqANhJCd9T--