Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Is there any place to talk about language features? Date: Wed, 28 Sep 2016 15:16:46 -0700 Organization: None to speak of Lines: 32 Message-ID: References: <7f35f731-ab20-4bbe-a26e-8c3af67f6984@googlegroups.com> <6927548f-a1eb-4f46-a78d-5b8a15b3cf3a@googlegroups.com> <23f97d5a-277e-4780-9fa2-8ed7f6310f6a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="9333"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1959kvGDx4RgPzjJkzz0QL7" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:rni03rZqMriUTWBRQbOwQbQJvaA= sha1:nYOjF2NHfNKXVtJlxbfj4nyozLQ= Xref: csiph.com comp.lang.c:94225 Thiago Adams writes: > More differences: > > - non-class types > typedef const char* String = NULL; Referring to `char*` or `const char*` as "string" or "String" is IMHO a bad idea. A `char*` value is not a string. It may or may not be a pointer to a string. > and we could have > > typedef enum { NONE, A, B } E = NONE; In both cases, do you intend the initializer to apply to the typedef, and not to the original type? Currently a typedef does not create a new type; it merely creates a new name for an existing type. (Admittedly "typedef" isn't the best name for this feature; "typealias" might have been better.) Introducing a semantic difference between a name defined by a typedef and the name of the original type would be a substantial language change. Please provide some context when posting a followup. See most of the articles here for examples. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"