Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #67924

Re: About getters/setters

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c++
Subject Re: About getters/setters
Date Sat, 24 Aug 2019 04:32:48 -0700
Organization A noiseless patient Spider
Lines 29
Message-ID <86h86623z3.fsf@mailhub.linuxsc.com> (permalink)
References <kSg7F.32840$Xs5.970@fx06.am4> <c053c20c-9b56-49c4-ab0a-0d060faa3c89@googlegroups.com> <dBx7F.346070$c8w1.123079@fx08.am4> <1a05f743-f9a4-47e5-8dc6-64abab4195b0@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Info reader02.eternal-september.org; posting-host="6c2dac2dbfb2638a855bf45348184c3b"; logging-data="12575"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hW/vFFjYiYBBn2InX133tLdWgJyjxpkA="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:c22+uQHN4WYbemZU6yeNRNPOLao= sha1:Pyow9fhtQkJqgtk3sz8+H03jDGQ=
Xref csiph.com comp.lang.c++:67924

Show key headers only | View raw


Tiib <ootiib@hot.ee> writes:

> On Thursday, 22 August 2019 17:25:24 UTC+3, JiiPee  wrote:
>
>> On 21/08/2019 20:52, Tiib wrote:
>>
>>> Snipping possible misrepresentation of Herb Sutter and

Strange comment considering that nowhere in the thread is any
reference given for Herb Sutter's views.  Given that you don't
know what Herb Sutter writings JiiPee means to refer to here,
there is no basis for claiming a misrepresentation, or even
a possible misrepresentation (except in the vacuous sense that
"all things are possible").

>>> CppCoreGuidelines of isocpp.
>
>> Sutter says like:  "Always make all data members private.  The only
>> exception is c-style struct where all members are public"
>
> CppCoreGuidelines at
> <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rh-get>
> does not conflict with it just suggest to prefer that c-style struct
> to all trivial setters and getters.  That is why your claim seemed
> misrepresentation.

For what it's worth, I think JiiPee's comments offer a more
faithful representation of the core guidelines document than
yours do.

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

About getters/setters JiiPee <no@notvalid.com> - 2019-08-21 20:22 +0100
  Re: About getters/setters Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-21 19:34 +0000
  Re: About getters/setters Bo Persson <bo@bo-persson.se> - 2019-08-21 21:40 +0200
  Re: About getters/setters Öö Tiib <ootiib@hot.ee> - 2019-08-21 12:52 -0700
    Re: About getters/setters JiiPee <no@notvalid.com> - 2019-08-22 15:25 +0100
      Re: About getters/setters Öö Tiib <ootiib@hot.ee> - 2019-08-22 09:06 -0700
        Re: About getters/setters Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-08-24 04:32 -0700
  Re: About getters/setters Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-08-22 15:09 -0700
    Re: About getters/setters Ian Collins <ian-news@hotmail.com> - 2019-08-23 16:17 +1200
      Re: About getters/setters Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-08-23 05:26 -0700
      Re: About getters/setters Melzzzzz <Melzzzzz@zzzzz.com> - 2019-08-23 18:07 +0000
    Re: About getters/setters JiiPee <no@notvalid.com> - 2019-08-23 07:09 +0100
  Re: About getters/setters JiiPee <no@notvalid.com> - 2019-08-23 07:13 +0100
    Re: About getters/setters David Brown <david.brown@hesbynett.no> - 2019-08-23 09:30 +0200
      Re: About getters/setters Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-25 06:16 +0000
        Re: About getters/setters David Brown <david.brown@hesbynett.no> - 2019-08-25 12:12 +0200
  Re: About getters/setters Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-23 11:24 +0000
    Re: About getters/setters James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-23 08:34 -0400
      Re: About getters/setters Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-23 14:48 +0000
      Re: About getters/setters Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-23 15:49 +0000

csiph-web