3 ms·
That's not a C++ community convention, it's just another bone headed part of the Google C++ coding standards. It's stupid because now everything is potentially
by femngi 12y ago
That's not a C++ community convention, it's just another bone headed part of the Google C++ coding standards. It's stupid because now everything is potentially nullable and every single function will start with:
if (!arg1 || !arg2 || !arg3 ...) {
what_I_should_do_here_isnt_really_clear();
- gtremper 12y agoI'm not a fan of the "pointer means mutable" idiom either. I feel you should only use a raw pointer type instead of a reference if you want nullptr to be a meaningful value. Value semantics are great.
- mreiland 12y agoI'm not a fan of idealism for the sake of idealism. It's practical to be able to tell at the callsite that the parameter can be changed by the function/method.
- mreiland 12y agoIt's been a C++ convention to use pointers for parameters that are meant to be changed for a long time. func_call(&var1); is most definitely a C++ convention bud, and it has nothing to do with google.