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


Groups > comp.lang.c > #94192 > unrolled thread

Is there any place to talk about language features?

Started byThiago Adams <thiago.adams@gmail.com>
First post2016-09-28 09:35 -0700
Last post2016-09-28 20:20 +0100
Articles 20 on this page of 135 — 24 participants

Back to article view | Back to comp.lang.c


Contents

  Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 09:35 -0700
    Re: Is there any place to talk about language features? Keith Thompson <kst-u@mib.org> - 2016-09-28 09:39 -0700
      Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 09:46 -0700
        Re: Is there any place to talk about language features? Richard Heathfield <rjh@cpax.org.uk> - 2016-09-28 17:53 +0100
        Re: Is there any place to talk about language features? David Brown <david.brown@hesbynett.no> - 2016-09-28 21:21 +0200
        Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-09-28 20:36 +0100
          Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 13:55 -0700
            Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 14:02 -0700
            Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-09-29 10:03 +1300
              Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 14:13 -0700
                Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-09-29 10:22 +1300
                  Re: Is there any place to talk about language features? Robert Latest <boblatest@yahoo.com> - 2016-10-03 08:47 +0000
                    Re: Is there any place to talk about language features? James Kuyper <jameskuyper@verizon.net> - 2016-10-03 07:44 -0400
                      Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-03 04:56 -0700
                        Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-10-03 13:18 +0100
                          Re: Is there any place to talk about language features? BGB <cr88192@hotmail.com> - 2016-10-03 12:43 -0500
                            Re: Is there any place to talk about language features? Ike Naar <ike@iceland.freeshell.org> - 2016-10-03 21:43 +0000
                              Re: Is there any place to talk about language features? John Gordon <gordon@panix.com> - 2016-10-03 22:28 +0000
                    Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-10-03 04:51 -0700
                      Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-10-03 13:10 +0100
                        Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-03 05:48 -0700
                          Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-10-03 14:03 +0100
                            Re: Is there any place to talk about language features? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-03 14:24 +0100
                              Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-03 07:07 -0700
                                Re: Is there any place to talk about language features? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-03 19:16 +0100
                            Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-03 07:16 -0700
                              Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-03 07:45 -0700
                              Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-03 07:57 -0700
                      Re: Is there any place to talk about language features? James Kuyper <jameskuyper@verizon.net> - 2016-10-03 08:21 -0400
                        Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-10-03 05:31 -0700
                        Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-03 06:43 -0700
                    Re: Is there any place to talk about language features? David Brown <david.brown@hesbynett.no> - 2016-10-03 15:08 +0200
                Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 14:22 -0700
                  Re: Is there any place to talk about language features? Keith Thompson <kst-u@mib.org> - 2016-09-28 15:16 -0700
                    Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 16:08 -0700
                      Re: Is there any place to talk about language features? Keith Thompson <kst-u@mib.org> - 2016-09-28 16:57 -0700
            Re: Is there any place to talk about language features? Keith Thompson <kst-u@mib.org> - 2016-09-28 14:19 -0700
              Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 14:50 -0700
                Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 17:03 -0700
                Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-09-29 01:08 +0100
                  Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-28 17:33 -0700
                    Re: Is there any place to talk about language features? Melzzzzz <Melzzzzz@zzzzz.com> - 2016-09-29 01:02 +0000
                      Re: Is there any place to talk about language features? BGB <cr88192@hotmail.com> - 2016-09-29 01:39 -0500
                        Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-09-29 00:48 -0700
                          Re: Is there any place to talk about language features? BGB <cr88192@hotmail.com> - 2016-09-29 11:59 -0500
                          Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-01 08:09 +1300
                            Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-30 12:14 -0700
                              Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-01 09:07 +1300
                                Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-30 13:53 -0700
                                  Re: Is there any place to talk about language features? Gareth Owen <gwowen@gmail.com> - 2016-09-30 22:13 +0100
                                    Re: Is there any place to talk about language features? raltbos@xs4all.nl (Richard Bos) - 2016-10-01 09:36 +0000
                                      Re: Is there any place to talk about language features? Jerry Stuckle <jstucklex@attglobal.net> - 2016-10-01 13:04 -0400
                                  Re: Is there any place to talk about language features? "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-09-30 14:20 -0700
                                  Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-09-30 22:30 +0100
                                Re: Is there any place to talk about language features? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2016-10-02 07:30 +0000
                            Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-01 01:51 -0700
                              Re: Is there any place to talk about language features? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-01 10:31 +0100
                              Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-01 23:22 +1300
                                Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-01 06:15 -0700
                                  Re: Is there any place to talk about language features? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-01 15:28 +0100
                                    Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-01 10:07 -0700
                                      Re: Is there any place to talk about language features? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-01 19:52 +0100
                                  Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-02 20:38 +1300
                                    Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-02 03:37 -0700
                                      Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-03 08:35 +1300
                                        Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-02 15:17 -0700
                                          Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-03 18:29 +1300
                                            Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-03 01:09 -0700
                                              Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-04 08:21 +1300
                                                Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-03 13:12 -0700
                                                  Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-03 14:34 -0700
                                                    Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-04 00:47 -0700
                                                    Re: Is there any place to talk about language features? Ike Naar <ike@iceland.freeshell.org> - 2016-10-04 07:49 +0000
                                                      Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-04 07:50 -0700
                                                        Re: Is there any place to talk about language features? Keith Thompson <kst-u@mib.org> - 2016-10-04 08:57 -0700
                                                          Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-04 10:42 -0700
                                                  Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-05 15:47 +1300
                                                    Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-04 20:58 -0700
                                                      Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-05 18:14 +1300
                                                        Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-05 02:15 -0700
                                                          Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-05 22:44 +1300
                                                            Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-05 03:12 -0700
                                                              Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-06 15:38 +1300
                                                                Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-05 19:50 -0700
                                                                  Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-06 16:25 +1300
                                                                    Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-05 21:19 -0700
                                                                      Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-06 18:11 +1300
                                                                        Re: Is there any place to talk about language features? Gareth Owen <gwowen@gmail.com> - 2016-10-06 06:38 +0100
                                                                        Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-06 00:36 -0700
                                                                          Re: Is there any place to talk about language features? gwowen <gwowen@gmail.com> - 2016-10-06 07:33 -0700
                                                                            Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-06 09:00 -0700
                                                                              Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-07 00:32 -0700
                                                                                Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-10-07 05:05 -0700
                                                                                  Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-07 08:13 -0700
                                                                            Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-07 00:20 -0700
                                                                              Re: Is there any place to talk about language features? Gareth Owen <gwowen@gmail.com> - 2016-10-07 17:01 +0100
                                                            Re: Is there any place to talk about language features? Les Cargill <lcargill99@comcast.com> - 2016-10-05 12:45 -0500
                                                          Re: Is there any place to talk about language features? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-05 11:12 +0100
                                                            Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-05 03:15 -0700
                                                              Re: Is there any place to talk about language features? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-05 14:41 +0100
                                                                Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-05 08:01 -0700
                                                                  Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-05 08:41 -0700
                                                                    Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-05 10:29 -0700
                                                    Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-10-05 12:29 -0700
                                            Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-10-05 11:08 +0100
                                              Re: Is there any place to talk about language features? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-05 14:35 +0100
                                                Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-10-05 18:15 +0100
                                                  Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-05 10:38 -0700
                                                    Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-10-05 19:14 +0100
                                                      Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-05 11:56 -0700
                                                    Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-10-05 11:57 -0700
                                                      Re: Is there any place to talk about language features? Keith Thompson <kst-u@mib.org> - 2016-10-05 12:18 -0700
                                                        Re: Is there any place to talk about language features? David Brown <david.brown@hesbynett.no> - 2016-10-05 21:49 +0200
                                                          Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-10-05 13:07 -0700
                                                          Re: Is there any place to talk about language features? "James R. Kuyper" <jameskuyper@verizon.net> - 2016-10-05 16:23 -0400
                                                            Re: Is there any place to talk about language features? David Brown <david.brown@hesbynett.no> - 2016-10-06 14:26 +0200
                                                        Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-05 13:56 -0700
                                                        Re: Is there any place to talk about language features? BartC <bc@freeuk.com> - 2016-10-06 14:17 +0100
                                                          Re: Is there any place to talk about language features? David Brown <david.brown@hesbynett.no> - 2016-10-06 15:53 +0200
                                                          Re: Is there any place to talk about language features? Keith Thompson <kst-u@mib.org> - 2016-10-06 09:12 -0700
                                                            Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-06 11:28 -0700
                                              Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-06 15:31 +1300
                                                Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-06 15:32 +1300
                                                Re: Is there any place to talk about language features? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-10-05 19:43 -0700
                                                  Re: Is there any place to talk about language features? Ian Collins <ian-news@hotmail.com> - 2016-10-06 16:05 +1300
                          Re: Is there any place to talk about language features? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2016-10-02 07:24 +0000
                        Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-09-30 16:17 -0700
                          Re: Is there any place to talk about language features? raltbos@xs4all.nl (Richard Bos) - 2016-10-01 09:39 +0000
                            Re: Is there any place to talk about language features? supercat@casperkitty.com - 2016-10-01 14:11 -0700
              Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-29 07:47 -0700
              Re: Is there any place to talk about language features? Thiago Adams <thiago.adams@gmail.com> - 2016-09-29 10:25 -0700
    Re: Is there any place to talk about language features? "James R. Kuyper" <jameskuyper@verizon.net> - 2016-09-28 12:59 -0400
      Re: Is there any place to talk about language features? Richard Heathfield <rjh@cpax.org.uk> - 2016-09-28 18:30 +0100
        Re: Is there any place to talk about language features? Keith Thompson <kst-u@mib.org> - 2016-09-28 12:10 -0700
      Re: Is there any place to talk about language features? James Harris <james.harris.1@gmail.com> - 2016-09-28 20:20 +0100

Page 1 of 7  [1] 2 3 4 5 6 7  Next page →


#94192 — Is there any place to talk about language features?

FromThiago Adams <thiago.adams@gmail.com>
Date2016-09-28 09:35 -0700
SubjectIs there any place to talk about language features?
Message-ID<d8b59afd-d77a-4769-9a17-b5df41c08a92@googlegroups.com>
Does C have an special usergroup/site to talk about language features?

[toc] | [next] | [standalone]


#94193

FromKeith Thompson <kst-u@mib.org>
Date2016-09-28 09:39 -0700
Message-ID<lnk2dwrnbj.fsf@kst-u.example.com>
In reply to#94192
Thiago Adams <thiago.adams@gmail.com> writes:
> Does C have an special usergroup/site to talk about language features?

Do you mean features of the C language as it's currently defined?  This
is certainly a good place.

If that's not what you mean, can you provide an example?

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
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"

[toc] | [prev] | [next] | [standalone]


#94195

FromThiago Adams <thiago.adams@gmail.com>
Date2016-09-28 09:46 -0700
Message-ID<bf11ed65-3eee-44cf-9612-680b4185af90@googlegroups.com>
In reply to#94193
On Wednesday, September 28, 2016 at 1:38:58 PM UTC-3, Keith Thompson wrote:
> Do you mean features of the C language as it's currently defined?  This
> is certainly a good place.
> 
> If that's not what you mean, can you provide an example?
> 
New features for the language, not defined yet. 

Nowadays is very easy to find information about the progress and whats is going on on C++ standard, but I am not finding similar information about C.

[toc] | [prev] | [next] | [standalone]


#94197

FromRichard Heathfield <rjh@cpax.org.uk>
Date2016-09-28 17:53 +0100
Message-ID<nsgsh5$ce4$1@dont-email.me>
In reply to#94195
On 28/09/16 17:46, Thiago Adams wrote:
> On Wednesday, September 28, 2016 at 1:38:58 PM UTC-3, Keith Thompson
> wrote:
>> Do you mean features of the C language as it's currently defined?
>> This is certainly a good place.
>>
>> If that's not what you mean, can you provide an example?
>>
> New features for the language, not defined yet.
>
> Nowadays is very easy to find information about the progress and
> whats is going on on C++ standard, but I am not finding similar
> information about C.


As I understand it, that is the purpose of the comp.std.c newsgroup - to 
discuss the existing C Standards and proposed changes to those 
Standards. That is, comp.std.c exists to discuss the language 
definition, and comp.lang.c exists to discuss the working out of that 
language definition in actual standard C programs.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

[toc] | [prev] | [next] | [standalone]


#94211

FromDavid Brown <david.brown@hesbynett.no>
Date2016-09-28 21:21 +0200
Message-ID<nsh572$h09$1@dont-email.me>
In reply to#94195
On 28/09/16 18:46, Thiago Adams wrote:
> On Wednesday, September 28, 2016 at 1:38:58 PM UTC-3, Keith Thompson
> wrote:
>> Do you mean features of the C language as it's currently defined?
>> This is certainly a good place.
>>
>> If that's not what you mean, can you provide an example?
>>
> New features for the language, not defined yet.
>
> Nowadays is very easy to find information about the progress and
> whats is going on on C++ standard, but I am not finding similar
> information about C.
>
>

A key difference here is that C++ is very willing to consider and adopt 
new language features, so there are plenty of places where potential new 
features are discussed.  But for C, language stability is very important 
- so very few new features are added.  Compare the Wikipedia pages for 
C11 and C++11 - C11 added only a few features to the language and the 
standard library, while C++11 has been described as almost being a new 
language from C++03.

So discussions of new features for C are mostly hypothetical - it is 
rare that they become reality, in comparison to C++.

(This is not a criticism of C or of C++.  Sometimes language stability 
is what you want, sometimes powerful new features is what you want. 
It's good that we have both languages to choose from.)

[toc] | [prev] | [next] | [standalone]


#94214

FromBartC <bc@freeuk.com>
Date2016-09-28 20:36 +0100
Message-ID<nsh635$kb4$1@dont-email.me>
In reply to#94195
On 28/09/2016 17:46, Thiago Adams wrote:
> On Wednesday, September 28, 2016 at 1:38:58 PM UTC-3, Keith Thompson wrote:
>> Do you mean features of the C language as it's currently defined?  This
>> is certainly a good place.
>>
>> If that's not what you mean, can you provide an example?
>>
> New features for the language, not defined yet.
>
> Nowadays is very easy to find information about the progress and whats is going on on C++ standard, but I am not finding similar information about C.

This group isn't very busy so proposals for new C features are welcome 
to most here I think. There have been plenty of such discussions in the 
past.

But beware that it will just be talk: C evolves extremely slowly, and 
then only with very uninteresting features.

-- 
Bartc

[toc] | [prev] | [next] | [standalone]


#94216

FromThiago Adams <thiago.adams@gmail.com>
Date2016-09-28 13:55 -0700
Message-ID<7f35f731-ab20-4bbe-a26e-8c3af67f6984@googlegroups.com>
In reply to#94214
On Wednesday, September 28, 2016 at 4:36:25 PM UTC-3, Bart wrote:
> On 28/09/2016 17:46, Thiago Adams wrote:
> > On Wednesday, September 28, 2016 at 1:38:58 PM UTC-3, Keith Thompson wrote:
> >> Do you mean features of the C language as it's currently defined?  This
> >> is certainly a good place.
> >>
> >> If that's not what you mean, can you provide an example?
> >>
> > New features for the language, not defined yet.
> >
> > Nowadays is very easy to find information about the progress and whats is going on on C++ standard, but I am not finding similar information about C.
> 
> This group isn't very busy so proposals for new C features are welcome 
> to most here I think. There have been plenty of such discussions in the 
> past.
> 
> But beware that it will just be talk: C evolves extremely slowly, and 
> then only with very uninteresting features.
> 
> -- 


The feature I am thinking about is "default initializers"

Today we can do:

struct Point {   int x;   int y; };
struct Point pt1 = { 1,  2 };

and this is useful when the initialization change by instance basis.
But, for some types the initialization is the same or it have common initiation part for all instances.
To avoid specify the common initialization everywhere the solution is create a macro.

struct Z { int type; };
#define Z_INIT { 4 }

struct Z z1 = Z_INIT;

The alternative solution that I am thinking is to define a default initializer and then the "init" macro will not be necessary anymore.

struct Z 
{
   int type = 4; //new syntax
   int other;
};

struct Z z; 
//z.type is 4 here
//z.other is not initialized (for performance?)

The following syntax would be equivalent:

struct Z z = {default};

And this is also valid:

struct Z * p = malloc(sizeof * p);
*p = (struct Z){default};

struct Y {  struct Z z; };
or
struct Y {   
 struct Z z = { .type = 4 }; //overrides the default  
};

struct Y y; //z is default initialized

More..

typedef const char* String = NULL;

String s; //default initialized


The variable is default-initialized if it have at least one default-initialization information, otherwise, everything is as C99.



[toc] | [prev] | [next] | [standalone]


#94217

FromThiago Adams <thiago.adams@gmail.com>
Date2016-09-28 14:02 -0700
Message-ID<8f9911aa-c5dc-4f19-a71f-41bbce4f4a4b@googlegroups.com>
In reply to#94216
To turn off the default initialization we could have

struct Z z = {void};

[toc] | [prev] | [next] | [standalone]


#94219

FromIan Collins <ian-news@hotmail.com>
Date2016-09-29 10:03 +1300
Message-ID<e52pguF3ol7U1@mid.individual.net>
In reply to#94216
On 09/29/16 09:55 AM, Thiago Adams wrote:
> On Wednesday, September 28, 2016 at 4:36:25 PM UTC-3, Bart wrote:
>> On 28/09/2016 17:46, Thiago Adams wrote:
>>> On Wednesday, September 28, 2016 at 1:38:58 PM UTC-3, Keith Thompson wrote:
>>>> Do you mean features of the C language as it's currently defined?  This
>>>> is certainly a good place.
>>>>
>>>> If that's not what you mean, can you provide an example?
>>>>
>>> New features for the language, not defined yet.
>>>
>>> Nowadays is very easy to find information about the progress and whats is going on on C++ standard, but I am not finding similar information about C.
>>
>> This group isn't very busy so proposals for new C features are welcome
>> to most here I think. There have been plenty of such discussions in the
>> past.
>>
>> But beware that it will just be talk: C evolves extremely slowly, and
>> then only with very uninteresting features.
>>
>> --
>
>
> The feature I am thinking about is "default initializers"

<snip>

What you go on to describe is pretty much C++11 initialisation.

-- 
Ian

[toc] | [prev] | [next] | [standalone]


#94220

FromThiago Adams <thiago.adams@gmail.com>
Date2016-09-28 14:13 -0700
Message-ID<6927548f-a1eb-4f46-a78d-5b8a15b3cf3a@googlegroups.com>
In reply to#94219
On Wednesday, September 28, 2016 at 6:03:36 PM UTC-3, Ian Collins wrote:
> On 09/29/16 09:55 AM, Thiago Adams wrote:
> > On Wednesday, September 28, 2016 at 4:36:25 PM UTC-3, Bart wrote:
> >> On 28/09/2016 17:46, Thiago Adams wrote:
> >>> On Wednesday, September 28, 2016 at 1:38:58 PM UTC-3, Keith Thompson wrote:
> >>>> Do you mean features of the C language as it's currently defined?  This
> >>>> is certainly a good place.
> >>>>
> >>>> If that's not what you mean, can you provide an example?
> >>>>
> >>> New features for the language, not defined yet.
> >>>
> >>> Nowadays is very easy to find information about the progress and whats is going on on C++ standard, but I am not finding similar information about C.
> >>
> >> This group isn't very busy so proposals for new C features are welcome
> >> to most here I think. There have been plenty of such discussions in the
> >> past.
> >>
> >> But beware that it will just be talk: C evolves extremely slowly, and
> >> then only with very uninteresting features.
> >>
> >> --
> >
> >
> > The feature I am thinking about is "default initializers"
> 
> <snip>
> 
> What you go on to describe is pretty much C++11 initialisation.
> 

Some differences:

 - don't require the concept of constructor.
 - I guess C++ didn't add the designators in initialization
 - This one we can turn-off
 - 

[toc] | [prev] | [next] | [standalone]


#94222

FromIan Collins <ian-news@hotmail.com>
Date2016-09-29 10:22 +1300
Message-ID<e52qkaF40dfU1@mid.individual.net>
In reply to#94220
On 09/29/16 10:13 AM, Thiago Adams wrote:
> On Wednesday, September 28, 2016 at 6:03:36 PM UTC-3, Ian Collins wrote:
>> On 09/29/16 09:55 AM, Thiago Adams wrote:
>>>
>>> The feature I am thinking about is "default initializers"
>>
>> <snip>
>>
>> What you go on to describe is pretty much C++11 initialisation.
>>
>
> Some differences:
>
>   - don't require the concept of constructor.

In this case, neither does C++.

>   - I guess C++ didn't add the designators in initialization

No, that's one very useful feature they stubbornly refuse to add!

>   - This one we can turn-off

Features can be turned off by not using them :)

I do find the

struct Z
{
    int type = 4; //new syntax
    int other;
};

syntax very useful in C++ and adding it to C wouldn't break any existing 
code.

-- 
Ian

[toc] | [prev] | [next] | [standalone]


#94410

FromRobert Latest <boblatest@yahoo.com>
Date2016-10-03 08:47 +0000
Message-ID<e5ek9rFs9kpU1@mid.individual.net>
In reply to#94222
Ian Collins wrote:
> I do find the

[...]

> syntax very useful in C++ and adding it to C wouldn't break any existing 
> code.

The problem with adding new features to any language is not about breaking
existing code. It's about breaking existing compilers. For C, there is a
plethora of compilers out there, many still used for embedded systems where
support ceased decades ago. Suppose someone were starting to learn "C with
features" down the road, only to find that the system they're targeting
doesn't support these features? If I had a job teaching (or writing books
about) C, I'd teach C89, giving my students the widest possible base for
future jobs (at the expense of a few inconveniences).

On the point, I agree that C has quite a few aspects that range from mere
oddities all the way to design flaws, but being aware of those and dealing
with them is part of using the language. If you can't, use a different
language.

I mostly use Python, R, and C, and I always enjoy switching between
languages (and the C compiler enjoys bitching about missing semicolons and
the '<-' operator). But C is always where I feel most at home.

robert

[toc] | [prev] | [next] | [standalone]


#94411

FromJames Kuyper <jameskuyper@verizon.net>
Date2016-10-03 07:44 -0400
Message-ID<nstgap$hu3$1@dont-email.me>
In reply to#94410
On 10/03/2016 04:47 AM, Robert Latest wrote:
> Ian Collins wrote:
>> I do find the
> 
> [...]
> 
>> syntax very useful in C++ and adding it to C wouldn't break any existing 
>> code.
> 
> The problem with adding new features to any language is not about breaking
> existing code. It's about breaking existing compilers. For C, there is a
> plethora of compilers out there, many still used for embedded systems where
> support ceased decades ago. Suppose someone were starting to learn "C with
> features" down the road, only to find that the system they're targeting
> doesn't support these features? If I had a job teaching (or writing books
> about) C, I'd teach C89, giving my students the widest possible base for
> future jobs (at the expense of a few inconveniences).

Then it doesn't matter what features get added to future versions of the
standard, those compilers will never conform with the new versions, and
people following your advice will never use the new features - so how
would those compilers be broken by such changes to the C standard? How
would such programmers be inconvenienced by those changes? Keep in mind
that we're talking about additions that "wouldn't break any existing
code" - so the fact that they might need to compile their code with a
more up-to-date compiler isn't a problem.

[toc] | [prev] | [next] | [standalone]


#94413

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2016-10-03 04:56 -0700
Message-ID<35ec6287-7c8c-429f-931b-c5691b64cc9d@googlegroups.com>
In reply to#94411
On Monday, October 3, 2016 at 12:44:47 PM UTC+1, James Kuyper wrote:
> On 10/03/2016 04:47 AM, Robert Latest wrote:
> > Ian Collins wrote:
> >> I do find the
> > 
> > [...]
> > 
> >> syntax very useful in C++ and adding it to C wouldn't break any existing 
> >> code.
> > 
> > The problem with adding new features to any language is not about breaking
> > existing code. It's about breaking existing compilers. For C, there is a
> > plethora of compilers out there, many still used for embedded systems where
> > support ceased decades ago. Suppose someone were starting to learn "C with
> > features" down the road, only to find that the system they're targeting
> > doesn't support these features? If I had a job teaching (or writing books
> > about) C, I'd teach C89, giving my students the widest possible base for
> > future jobs (at the expense of a few inconveniences).
> 
> Then it doesn't matter what features get added to future versions of the
> standard, those compilers will never conform with the new versions, and
> people following your advice will never use the new features - so how
> would those compilers be broken by such changes to the C standard? How
> would such programmers be inconvenienced by those changes? Keep in mind
> that we're talking about additions that "wouldn't break any existing
> code" - so the fact that they might need to compile their code with a
> more up-to-date compiler isn't a problem.
>
In an sense that's true. Once a language is out and into the wild, the set of
acceptable programs can only get narrower, until all of the legacy systems
are so far out of date they can be ignored. But if one of the legacy systems
is Microsoft Windows, there's no way anyone writing general-purpose hosted
code can say that platform can be ignored.

But it's not psychological reality to refrain from using new features until all
the old systems are gone. So new versions create a situation where code
compiles in some places, not others, where people don't realise they are
using features which may not be supported elsewhere.

[toc] | [prev] | [next] | [standalone]


#94415

FromBartC <bc@freeuk.com>
Date2016-10-03 13:18 +0100
Message-ID<nsti9v$ola$1@dont-email.me>
In reply to#94413
On 03/10/2016 12:56, Malcolm McLean wrote:
> On Monday, October 3, 2016 at 12:44:47 PM UTC+1, James Kuyper wrote:
>> On 10/03/2016 04:47 AM, Robert Latest wrote:
>>> Ian Collins wrote:
>>>> I do find the
>>>
>>> [...]
>>>
>>>> syntax very useful in C++ and adding it to C wouldn't break any existing
>>>> code.
>>>
>>> The problem with adding new features to any language is not about breaking
>>> existing code. It's about breaking existing compilers. For C, there is a
>>> plethora of compilers out there, many still used for embedded systems where
>>> support ceased decades ago. Suppose someone were starting to learn "C with
>>> features" down the road, only to find that the system they're targeting
>>> doesn't support these features? If I had a job teaching (or writing books
>>> about) C, I'd teach C89, giving my students the widest possible base for
>>> future jobs (at the expense of a few inconveniences).
>>
>> Then it doesn't matter what features get added to future versions of the
>> standard, those compilers will never conform with the new versions, and
>> people following your advice will never use the new features - so how
>> would those compilers be broken by such changes to the C standard? How
>> would such programmers be inconvenienced by those changes? Keep in mind
>> that we're talking about additions that "wouldn't break any existing
>> code" - so the fact that they might need to compile their code with a
>> more up-to-date compiler isn't a problem.
>>
> In an sense that's true. Once a language is out and into the wild, the set of
> acceptable programs can only get narrower, until all of the legacy systems
> are so far out of date they can be ignored. But if one of the legacy systems
> is Microsoft Windows, there's no way anyone writing general-purpose hosted
> code can say that platform can be ignored.
>
> But it's not psychological reality to refrain from using new features until all
> the old systems are gone. So new versions create a situation where code
> compiles in some places, not others, where people don't realise they are
> using features which may not be supported elsewhere.

The reality with a lot of C software is that it won't compile anyway unless:

* You're using gcc

* You're using the right 'make'

* You're using exactly the right set of compiler attributes and
   command-line options (which make it harder to use any other
   compiler)

* You're compiling under Unix or have imported half the Unix
   eco-system so that you now depend on a dozen other utilities.

-- 
Bartc

[toc] | [prev] | [next] | [standalone]


#94427

FromBGB <cr88192@hotmail.com>
Date2016-10-03 12:43 -0500
Message-ID<nsu5ba$9rd$1@news.albasani.net>
In reply to#94415
On 10/3/2016 7:18 AM, BartC wrote:
> On 03/10/2016 12:56, Malcolm McLean wrote:
>> On Monday, October 3, 2016 at 12:44:47 PM UTC+1, James Kuyper wrote:
>>> On 10/03/2016 04:47 AM, Robert Latest wrote:
>>>> Ian Collins wrote:
>>>>> I do find the
>>>>
>>>> [...]
>>>>
>>>>> syntax very useful in C++ and adding it to C wouldn't break any
>>>>> existing
>>>>> code.
>>>>
>>>> The problem with adding new features to any language is not about
>>>> breaking
>>>> existing code. It's about breaking existing compilers. For C, there
>>>> is a
>>>> plethora of compilers out there, many still used for embedded
>>>> systems where
>>>> support ceased decades ago. Suppose someone were starting to learn
>>>> "C with
>>>> features" down the road, only to find that the system they're targeting
>>>> doesn't support these features? If I had a job teaching (or writing
>>>> books
>>>> about) C, I'd teach C89, giving my students the widest possible base
>>>> for
>>>> future jobs (at the expense of a few inconveniences).
>>>
>>> Then it doesn't matter what features get added to future versions of the
>>> standard, those compilers will never conform with the new versions, and
>>> people following your advice will never use the new features - so how
>>> would those compilers be broken by such changes to the C standard? How
>>> would such programmers be inconvenienced by those changes? Keep in mind
>>> that we're talking about additions that "wouldn't break any existing
>>> code" - so the fact that they might need to compile their code with a
>>> more up-to-date compiler isn't a problem.
>>>
>> In an sense that's true. Once a language is out and into the wild, the
>> set of
>> acceptable programs can only get narrower, until all of the legacy
>> systems
>> are so far out of date they can be ignored. But if one of the legacy
>> systems
>> is Microsoft Windows, there's no way anyone writing general-purpose
>> hosted
>> code can say that platform can be ignored.
>>
>> But it's not psychological reality to refrain from using new features
>> until all
>> the old systems are gone. So new versions create a situation where code
>> compiles in some places, not others, where people don't realise they are
>> using features which may not be supported elsewhere.
>
> The reality with a lot of C software is that it won't compile anyway
> unless:
>
> * You're using gcc
>
> * You're using the right 'make'
>
> * You're using exactly the right set of compiler attributes and
>   command-line options (which make it harder to use any other
>   compiler)
>
> * You're compiling under Unix or have imported half the Unix
>   eco-system so that you now depend on a dozen other utilities.
>

I have recently dealt with a project which (sort of) builds on Linux, 
but fails to build (without tweaking) on WS4L, because NTFS doesn't 
implement some obscure behaviors from Linux/EXTn and similar.

meanwhile, Windows is like, "no, I won't allow you to delete a directory 
which contains files which are currently still open" (whereas on Linux, 
the files will poof into nonexistence once closed).

if lucky, one might encounter projects which internally use 
sudo/mount/... as part of their build process, or download/patch/compile 
a specific version of GCC (to compile other parts of the project, or to 
make a special-purpose cross-compiler), ...

would be nice if people were basing these on something a little smaller, 
say, using LCC or something, for their one-off cross-compilers (or maybe 
split the download/rebuild GCC part into a separate shell-script from 
the main project build, so you don't need to go through this part if the 
cross-compiler is already built...).


but, generally, I try to write my code to be "moderately portable", 
using a feature set limited mostly to the combinations of targets I care 
about the code running on.

I had one thing some-odd years ago where at one point I had almost 
backed myself into a corner (depending on too much that was specific to 
32-bit x86), but have since tried to write code where the core is fairly 
portable, mostly falling back to OS and HW specific stuff for special 
cases (so code can be reasonably fast/capable on known targets, but 
things aren't SOL on unknown targets).


some more fundamental assumptions exist, for example, the approximate 
amount of memory/address-space available.

say, one has several 32-bit targets:
one has up to 2GB of usable address space, can be casual as 
virtual-memory will mostly take care of it;
another has 64kB of physically-mapped RAM (and 256kB ROM);
another has 256kB of physically-mapped RAM (and 2MB ROM);
and an intermediate has 8MB of physically-mapped RAM (with the program 
running from RAM, ROM space mostly used as a filesystem).

code naively written to work on one of these will not work on the others.


memory handling will be different, and code may have things in it like:
   GPIO_SET=0x13;	//turn some pins on
where off in a header, we have something like, say (not real addr's):
   #define GPIO_GET (*(volatile unsigned int *)0xAC080004)
   #define GPIO_SET (*(volatile unsigned int *)0xAC080008)

one might also casually encounter a custom malloc implementation using 
hard-coded address ranges or similar (because, the code was written for 
a target with neither malloc nor an OS), ...

and, things like console-handling is done via hard-coded memory-mapped 
registers for a serial UART interface.

so, this part isn't really going to work correctly on a normal PC...


a moderate approach exists, where one can target various targets via the 
use of #ifdef, while ignoring issues outside the scope of where it may run.

for the most part this means using a C dialect partway between C95 and 
C99, and avoiding too much dependence on compiler-specific features 
(they can be nice, but generally need similar treatment to 
hardware/target specific features).


or such...

[toc] | [prev] | [next] | [standalone]


#94432

FromIke Naar <ike@iceland.freeshell.org>
Date2016-10-03 21:43 +0000
Message-ID<slrn3vfsnv5k8d.foe.ike@iceland.freeshell.org>
In reply to#94427
On 2016-10-03, BGB <cr88192@hotmail.com> wrote:
> [snip]
> or such...

What does this mean? In my native language (which is not English)
the literal translation of "or such" means "forget what I just
said, it did't make any sense".

[toc] | [prev] | [next] | [standalone]


#94433

FromJohn Gordon <gordon@panix.com>
Date2016-10-03 22:28 +0000
Message-ID<nsum26$er1$1@reader2.panix.com>
In reply to#94432
In <slrn3vfsnv5k8d.foe.ike@iceland.freeshell.org> Ike Naar <ike@iceland.freeshell.org> writes:

> > or such...

> What does this mean? In my native language (which is not English)
> the literal translation of "or such" means "forget what I just
> said, it did't make any sense".

"Or other similar things."

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

[toc] | [prev] | [next] | [standalone]


#94412

FromThiago Adams <thiago.adams@gmail.com>
Date2016-10-03 04:51 -0700
Message-ID<c64e87fd-bb41-47ae-9414-19bc9b44961b@googlegroups.com>
In reply to#94410
On Monday, October 3, 2016 at 5:48:09 AM UTC-3, Robert Latest wrote:
> Ian Collins wrote:
> > I do find the
> 
> [...]
> 
> > syntax very useful in C++ and adding it to C wouldn't break any existing 
> > code.
> 
> The problem with adding new features to any language is not about breaking
> existing code. It's about breaking existing compilers. For C, there is a
> plethora of compilers out there, many still used for embedded systems where
> support ceased decades ago. 

I think the solution for this dilemma could be:

 - Leave C language focused on generate code. 

 - Open the door for standard annotations. For instance, create a syntax that is a kind of comment without affect code generation.  (Kind of #pragma) (C++ has now [[attributes]])
   So compilers will with this features will work with unknown annotations (future) that doesn't affected the generated code.

 - Experimentation with more generic macros. This could allow experimentation with new features without broke compilers (Hygienic macros).

 - For last, transpilers C to OlD C. This would require tooling.


[toc] | [prev] | [next] | [standalone]


#94414

FromBartC <bc@freeuk.com>
Date2016-10-03 13:10 +0100
Message-ID<nsthrs$n6d$1@dont-email.me>
In reply to#94412
On 03/10/2016 12:51, Thiago Adams wrote:
> On Monday, October 3, 2016 at 5:48:09 AM UTC-3, Robert Latest wrote:
>> Ian Collins wrote:
>>> I do find the
>>
>> [...]
>>
>>> syntax very useful in C++ and adding it to C wouldn't break any existing
>>> code.
>>
>> The problem with adding new features to any language is not about breaking
>> existing code. It's about breaking existing compilers. For C, there is a
>> plethora of compilers out there, many still used for embedded systems where
>> support ceased decades ago.
>
> I think the solution for this dilemma could be:
>
>  - Leave C language focused on generate code.
>
>  - Open the door for standard annotations. For instance, create a syntax that is a kind of comment without affect code generation.  (Kind of #pragma) (C++ has now [[attributes]])
>    So compilers will with this features will work with unknown annotations (future) that doesn't affected the generated code.
>
>  - Experimentation with more generic macros. This could allow experimentation with new features without broke compilers (Hygienic macros).

For me, the question of improvements to C is academic. I've always used 
my own languages, and have decided to continue doing that. (Because I 
code for pleasure and my own language is nicer to use. IMO.)

So my main need requirement of C is as an intermediate language (for the 
purposes of portability and, depending on compiler, more efficient code).

Then I don't need any advanced features. (If anything, it could be 
simpler and not get in the way so much. There have been specialist 
languages for this but they have their own problems.)

Talking about them is still interesting however.

>  - For last, transpilers C to OlD C. This would require tooling.

I was about to look up 'OlD C' but then realised you meant Old C.

If so, that's sort of what I do (but to just 'C' rather than 'Old C').

Although, it's not quite as simple as it sounds, if you have new 
features that don't quite match what's already in C. Also if you want 
the result to be human readable.

(One example: your source language always interprets an 'int' type as 32 
bits wide by default. But do you translate it as 'int', which may have 
different widths depending on the target C implementation, or as the 
less readable 'int32_t'?)

-- 
Bartc

[toc] | [prev] | [next] | [standalone]


Page 1 of 7  [1] 2 3 4 5 6 7  Next page →

Back to top | Article view | comp.lang.c


csiph-web