Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #153648
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: typedef ... refactored |
| Date | 2020-08-14 10:29 -0700 |
| Organization | None to speak of |
| Message-ID | <87wo21xhjx.fsf@nosuchdomain.example.com> (permalink) |
| References | (4 earlier) <20200813005227.b02c40b51ddf5ad71c7ca82b@gmail.com> <rh5v58$349$1@dont-email.me> <SAvZG.2442895$fgO.1865466@fx12.am4> <rh61ij$h7d$1@dont-email.me> <rh683a$oi0$1@dont-email.me> |
David Brown <david.brown@hesbynett.no> writes:
[...]
> The distinction between "struct X" and "typedef X" namespaces is
> unavoidable in C, and useful as it lets you use the same name for a
> struct and its typedef. (The alternative is to do as C++ did - make "X"
> automatically a typedef for "struct X". That is, IMHO, better - but it
> was a change that could be made for C++ when C++ was new, not for C when
> C was already old.)
Strictly speaking, C++ doesn't make automatically create typedefs. It
has the same typedef feature that C has, and it's used only when you use
the "typedef" keyword. The difference is that struct tags (also enum,
union, and class tags) are directly visible.
You could achieve (mostly?) the same effect by using automatically
created typedefs, but that's not what C++ does.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
typedef ... refactored G G <gdotone@gmail.com> - 2020-08-09 01:07 -0700
Re: typedef ... refactored G G <gdotone@gmail.com> - 2020-08-09 01:46 -0700
Re: typedef ... refactored Richard Damon <Richard@Damon-Family.org> - 2020-08-09 08:09 -0400
Re: typedef ... refactored Manfred <noname@add.invalid> - 2020-08-09 18:08 +0200
Re: typedef ... refactored Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-08-09 09:29 +0000
Re: typedef ... refactored Johann Klammer <klammerj@NOSPAM.a1.net> - 2020-08-09 13:29 +0200
Re: typedef ... refactored Bonita Montero <Bonita.Montero@gmail.com> - 2020-08-09 13:53 +0200
Re: typedef ... refactored Poprocks <please@replytogroup.com> - 2020-08-10 20:37 +0000
Re: typedef ... refactored Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-10 13:49 -0700
Re: typedef ... refactored Poprocks <please@replytogroup.com> - 2020-08-10 23:09 +0000
Re: typedef ... refactored Jorgen Grahn <grahn+nntp@snipabacken.se> - 2020-08-11 07:14 +0000
Why not indeed??? (Was: typedef ... refactored) gazelle@shell.xmission.com (Kenny McCormack) - 2020-08-11 07:48 +0000
Re: typedef ... refactored Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-08-11 10:56 +0100
Re: typedef ... refactored Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-08-28 04:08 -0700
Re: typedef ... refactored Bonita Montero <Bonita.Montero@gmail.com> - 2020-08-11 08:10 +0200
Re: typedef ... refactored Anton Shepelev <anton.txt@gmail.com> - 2020-08-13 00:52 +0300
Re: typedef ... refactored Bonita Montero <Bonita.Montero@gmail.com> - 2020-08-14 14:13 +0200
Re: typedef ... refactored Bart <bc@freeuk.com> - 2020-08-14 13:37 +0100
Re: typedef ... refactored Bonita Montero <Bonita.Montero@gmail.com> - 2020-08-14 14:54 +0200
Re: typedef ... refactored David Brown <david.brown@hesbynett.no> - 2020-08-14 16:46 +0200
Re: typedef ... refactored Bart <bc@freeuk.com> - 2020-08-14 16:59 +0100
Re: typedef ... refactored David Brown <david.brown@hesbynett.no> - 2020-08-14 21:05 +0200
Re: typedef ... refactored Bart <bc@freeuk.com> - 2020-08-14 20:51 +0100
Re: typedef ... refactored antispam@math.uni.wroc.pl - 2020-08-16 13:36 +0000
Re: typedef ... refactored Bart <bc@freeuk.com> - 2020-08-16 15:58 +0100
Re: typedef ... refactored antispam@math.uni.wroc.pl - 2020-08-16 18:10 +0000
Re: typedef ... refactored Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-14 13:23 -0700
Re: typedef ... refactored David Brown <david.brown@hesbynett.no> - 2020-08-16 19:48 +0200
[OT] words. Was: typedef ... refactored Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-08-16 20:08 +0100
Re: [OT] words. Was: typedef ... refactored David Brown <david.brown@hesbynett.no> - 2020-08-17 10:50 +0200
Re: [OT] words. Was: typedef ... refactored Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-08-17 12:00 +0100
Re: typedef ... refactored Anton Shepelev <anton.txt@g{oogle}mail.com> - 2020-08-17 17:51 +0300
Re: typedef ... refactored Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-08-17 16:06 +0100
Re: typedef ... refactored Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-17 10:48 -0700
Re: typedef ... refactored scott@slp53.sl.home (Scott Lurndal) - 2020-08-17 19:36 +0000
Re: typedef ... refactored Siri Cruise <chine.bleu@yahoo.com> - 2020-08-17 14:06 -0700
Re: typedef ... refactored Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-08-28 03:53 -0700
Re: typedef ... refactored Kaz Kylheku <793-849-0957@kylheku.com> - 2020-08-28 15:30 +0000
Re: typedef ... refactored Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-08-29 02:24 +0100
Re: typedef ... refactored Bonita Montero <Bonita.Montero@gmail.com> - 2020-08-14 18:37 +0200
Re: typedef ... refactored Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-14 10:29 -0700
Re: typedef ... refactored David Brown <david.brown@hesbynett.no> - 2020-08-14 21:10 +0200
Re: typedef ... refactored Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-08-14 12:32 -0700
Re: typedef ... refactored G G <gdotone@gmail.com> - 2020-08-09 05:44 -0700
Re: typedef ... refactored Barry Schwarz <schwarzb@delq.com> - 2020-08-09 08:12 -0700
Re: typedef ... refactored G G <gdotone@gmail.com> - 2020-08-09 08:32 -0700
Re: typedef ... refactored John Bode <jfbode1029@gmail.com> - 2020-08-12 11:45 -0700
Re: typedef ... refactored Bart <bc@freeuk.com> - 2020-08-12 19:59 +0100
Re: typedef ... refactored Siri Cruise <chine.bleu@yahoo.com> - 2020-08-12 14:16 -0700
Re: typedef ... refactored Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-08-28 05:05 -0700
Re: typedef ... refactored Anton Shepelev <anton.txt@gmail.com> - 2020-08-13 00:41 +0300
csiph-web