Re:The C++14 Standard: What You Need to Know
by femngi on Wednesday September 17, 2014 @02:41PM
(#8331622)
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:
[ Parent
| on HN ]
Re:The C++14 Standard: What You Need to Know
by gtremper on Wednesday September 17, 2014 @04:14PM
(#8332133)
I'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.
Re:The C++14 Standard: What You Need to Know
by mreiland on Wednesday September 17, 2014 @11:05PM
(#8333466)
I'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.
Re:The C++14 Standard: What You Need to Know
by mreiland on Wednesday September 17, 2014 @11:02PM
(#8333458)
It'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.