do zero 0 (zero) pointers c++?
in early days c++ bolted tip c, zero tangible (void*)0. distribute zero any pointer void*, finished kind useless. behind those days, supposed used 0 (zero) zero pointers.
to day, i have continued 0 zero pointer nonetheless those around me insist controlling null. i personally any advantage giving name (null) an existent value - given i also exam pointers law values:
if (p && !q)
do_something();
then controlling 0 creates some-more clarity (as null, can't logically p && !q - need definitely review opposing null, unless assume null zero, box since null).
is there any settlement reason move 0 over zero (or clamp versa), only personal preference?
edit: i should supplement (and meant creatively say) raii exceptions, i magnitude zero/null pointers, nonetheless infrequently need still.
Comments
Post a Comment