- Need help implementing command line args on Apple-world & other systems - 3 Updates
- Let'me learn. - 1 Update
Ian Collins <ian-news@hotmail.com>: Jul 08 10:00AM +1200 On 07/ 8/17 09:23 AM, Alf P. Steinbach wrote: >> 0) Use of "private:" here is superfluous. > Generally, explicit is good, implicit is bad, except where you need a > choice to adapt automatically to changes. In general, idiomatic is good, superfluous verbosity is bad! Every C++ programmer knows the default access for a class is private and a struct is public. Would your write struct X { public: int n; }; ? I'd put it in the same bucket as the pointless use of "::std" > quote of Leigh's points, you would like to be /explicit/ about the > choice for iterator return type where that is needlessly constraining, > brittle and verbose; in both cases opposite of the code as given. The auto vs alias debate is one my current team often has. I tend towards auto for simple, in class declaration members (such as your begin() and end()) and alias elsewhere. I only use suffix return in templates where it is genuinely useful. So I don't agree with his third point. I do completely agree with his objection to using at() in your operator[]. > From my point of view that's a let's-adopt-anti-patterns! mindset. Superfluous verbosity is the anti-pattern... -- Ian |
"Öö Tiib" <ootiib@hot.ee>: Jul 07 03:32PM -0700 On Friday, 7 July 2017 19:13:30 UTC+3, Alf P. Steinbach wrote: > On 07-Jul-17 3:26 PM, Mr Flibble wrote: > > 2) Private should come after public. > I have a different and, I believe, just as well-informed opinion. That is exactly the fun about opinions! ;) Class members is one of the few places in C++ where declaration order does not affect the outcome much. |
Daniel <danielaparker@gmail.com>: Jul 07 04:09PM -0700 On Friday, July 7, 2017 at 6:32:26 PM UTC-4, Öö Tiib wrote: > > > 2) Private should come after public. > > I have a different and, I believe, just as well-informed opinion. > That is exactly the fun about opinions! ;) Especially fun when they run counter to the received wisdom! Daniel |
woodbrian77@gmail.com: Jul 07 02:56PM -0700 On Thursday, July 6, 2017 at 5:56:21 PM UTC-5, Öö Tiib wrote: > > yet, though, from what I can tell. > I don't know if we need multiple different ways to express exactly > same thing. I consider 'make_unique' to be a bit of a kludge. If it had been 'make_uniqueptr' that would have been a little better. At any rate, this new form looks promising to me. A number of things from C++ 2011 have largely displaced older forms. Brian Ebenezer Enterprises - In G-d we trust. http://webEbenezer.net |
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