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


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

Re: C++ variable names

From Manfred <noname@add.invalid>
Newsgroups comp.lang.c++
Subject Re: C++ variable names
Date 2020-01-18 16:22 +0100
Organization Aioe.org NNTP Server
Message-ID <qvv7ra$1cg6$1@gioia.aioe.org> (permalink)
References <qvohup$gar$1@dont-email.me> <4d6f2d19-ff6f-433c-bff9-adde1c8b719a@googlegroups.com> <qvqlni$ofi$2@dont-email.me> <2a3d69e3-50c6-45df-94ce-cd23723c158a@googlegroups.com>

Show all headers | View raw


On 1/16/2020 11:11 PM, Öö Tiib wrote:
> On Thursday, 16 January 2020 23:48:52 UTC+2, Lynn McGuire  wrote:
>> On 1/15/2020 8:42 PM, Daniel wrote:
>>> On Wednesday, January 15, 2020 at 9:32:02 PM UTC-5, T wrote:
>>>> Hi All,
>>>>
>>>> Would some kind individual please fill in
>>>> the C++ variables names that go with these
>>>> C variable names?
>>>>
>>>> int8_t in C
>>>
>>> ...
>>>>
>>>> Do I just drop the "_t"?
>>>>
>>> In general it's considered to be bad practice to adorn a variable name
>>> with type information.
>>>
>>> Daniel
>>
>> Huh ?  Don't tell that to Hungarian notation folks.
>>      https://en.wikipedia.org/wiki/Hungarian_notation
> 
> Yes, but the Hungarian notation guys are frowned upon in majority of
> collectives. By
> <https://en.wikipedia.org/wiki/Hungarian_notation#Notable_opinions>
> Bjarne Stroustrup does not recommend it.
> It can be tricky for three star programmer to understand what they
> do without such notation OTOH it is unclear if it does help.
> <https://wiki.c2.com/?ThreeStarProgrammer>
> 
> 

Note that, as far as I read somewhere, the Hungarian notation was 
initially introduced to indicate the "intention or kind" of a variable 
or function, which is not that silly of an idea - in fact you always use 
the variable name to indicate its purpose, the Hungarian decoration 
introduced some kind of naming convention with this respect.
For example, I read it was initially used to identify the coordinate 
system some point would belong to (page, print margins, ...) in MS 
Office applications.

It ended up being misused to encode the variable type in its name, which 
is indeed questionable at best, and definitely unfit for generic 
programming.

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


Thread

C++ variable names T <T@invalid.invalid> - 2020-01-15 18:31 -0800
  Re: C++ variable names Daniel <danielaparker@gmail.com> - 2020-01-15 18:42 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 18:46 -0800
      Re: C++ variable names Daniel <danielaparker@gmail.com> - 2020-01-15 21:30 -0800
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 21:52 -0800
      Re: C++ variable names Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2020-01-15 23:44 -0700
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 22:59 -0800
          Re: C++ variable names Bo Persson <bo@bo-persson.se> - 2020-01-16 08:44 +0100
            Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:48 -0800
            Re: C++ variable names David Brown <david.brown@hesbynett.no> - 2020-01-16 10:08 +0100
          Re: C++ variable names Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2020-01-16 00:43 -0700
            Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:51 -0800
              Re: C++ variable names Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2020-01-16 01:39 -0700
                Re: C++ variable names T <T@invalid.invalid> - 2020-01-16 14:01 -0800
    Re: C++ variable names Lynn McGuire <lynnmcguire5@gmail.com> - 2020-01-16 15:48 -0600
      Re: C++ variable names Öö Tiib <ootiib@hot.ee> - 2020-01-16 14:11 -0800
        Re: C++ variable names Lynn McGuire <lynnmcguire5@gmail.com> - 2020-01-17 18:52 -0600
        Re: C++ variable names Manfred <noname@add.invalid> - 2020-01-18 16:22 +0100
          Re: C++ variable names Öö Tiib <ootiib@hot.ee> - 2020-01-18 10:41 -0800
          Re: C++ variable names Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-01-21 05:31 -0800
      Re: C++ variable names David Brown <david.brown@hesbynett.no> - 2020-01-16 23:32 +0100
      Re: C++ variable names legalize+jeeves@mail.xmission.com (Richard) - 2020-01-19 19:13 +0000
  Re: C++ variable names red floyd <no.spam@its.invalid> - 2020-01-15 18:45 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 18:47 -0800
    Re: C++ variable names Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-01-15 21:51 -0800
      Re: C++ variable names red floyd <no.spam@its.invalid> - 2020-01-15 22:44 -0800
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:00 -0800
  Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 19:40 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 19:58 -0800
      Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 20:12 -0800
    Re: C++ variable names James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-01-15 23:18 -0500
      Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 20:20 -0800
        Re: C++ variable names James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-01-16 12:06 -0800
          Re: C++ variable names T <T@invalid.invalid> - 2020-01-16 14:02 -0800
      Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 20:31 -0800
        Re: C++ variable names David Brown <david.brown@hesbynett.no> - 2020-01-16 11:09 +0100
  Re: C++ variable names Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-01-16 03:52 +0000
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 19:59 -0800
      Re: C++ variable names Bo Persson <bo@bo-persson.se> - 2020-01-16 06:33 +0100
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 21:53 -0800
  Re: C++ variable names Bonita Montero <Bonita.Montero@gmail.com> - 2020-01-16 06:18 +0100
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 21:54 -0800
      Re: C++ variable names Bonita Montero <Bonita.Montero@gmail.com> - 2020-01-16 06:59 +0100
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 22:31 -0800
          Re: C++ variable names Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-01-16 00:15 -0800
          Re: C++ variable names Bonita Montero <Bonita.Montero@gmail.com> - 2020-01-16 11:25 +0100
            Re: C++ variable names Mister2U@honorific.org - 2020-01-16 11:47 +0000
              Re: C++ variable names Bonita Montero <Bonita.Montero@gmail.com> - 2020-01-16 13:31 +0100
                Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-16 15:51 -0800
                Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-16 15:51 -0800
                Re: C++ variable names Manfred <invalid@add.invalid> - 2020-01-17 01:31 +0100
  Re: C++ variable names Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-01-15 21:48 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 21:55 -0800
      Re: C++ variable names Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-01-16 00:01 -0800
    Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 22:28 -0800
      Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 22:31 -0800
  Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 23:16 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:26 -0800
      Re: C++ variable names "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2020-01-15 23:34 -0800
        Re: C++ variable names T <T@invalid.invalid> - 2020-01-15 23:53 -0800
          Re: C++ variable names Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2020-01-16 03:04 -0700
  C++ variable names James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-01-16 11:51 -0800
    Re: C++ variable names T <T@invalid.invalid> - 2020-01-16 13:58 -0800

csiph-web