- Simple Program from 2.3.2 of Stroustrup 3/e - 2 Updates
- Semantics of comma operator - 1 Update
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Jan 15 11:59PM +0100 On 1/15/2018 11:52 PM, Ian Collins wrote: > Um, you are probably in a small minority there. To my eyes they are > just clutter. In our code base I remove spurious parameter qualifiers > almost as zealously as I remove passing integral types by const reference! One can make a case for that, e.g. that it supports move semantics by default. But I value default `const`-ness as support for correctness, more than I value default mutability as support for that optimization. So, different choices. ;-) [snip] Cheers & hth., - Alf |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jan 15 11:01PM On 15/01/2018 22:45, Alf P. Steinbach wrote: > versa. > Mainly that it, in the general case, constrains the possible effects of > the code, so that the code is easier to grok and reason about. Reason about wrongly you mean: making the function *parameter* const may lead you to have the false impression that the function *argument* that was copied to it was also const or a constant when in fact it was a variable. IMO this, like most of your other idioms, obfuscates rather then elucidates. /Flibble -- "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
Vir Campestris <vir.campestris@invalid.invalid>: Jan 15 09:58PM On 15/01/2018 00:13, David Brown wrote: > It is simply /crazy/ to write code that where you have a reasonable > expectation that average programmers will have to look up a reference > manual to interpret it correctly. Thank you. I am not alone. Andy |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment