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


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

New features added into C23 standard

Started byThiago Adams <thiago.adams@gmail.com>
First post2022-07-22 12:32 -0700
Last post2022-08-18 20:23 -0700
Articles 7 on this page of 87 — 20 participants

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


Contents

  New features added into C23 standard Thiago Adams <thiago.adams@gmail.com> - 2022-07-22 12:32 -0700
    Re: New features added into C23 standard Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-07-22 23:15 +0100
    Re: New features added into C23 standard Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-07-23 01:31 -0700
      Re: New features added into C23 standard gazelle@shell.xmission.com (Kenny McCormack) - 2022-07-23 10:10 +0000
    Re: New features added into C23 standard Thiago Adams <thiago.adams@gmail.com> - 2022-07-25 13:49 -0700
      Re: New features added into C23 standard Thiago Adams <thiago.adams@gmail.com> - 2022-07-25 13:57 -0700
        Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-25 14:50 -0700
          Re: New features added into C23 standard Thiago Adams <thiago.adams@gmail.com> - 2022-07-25 15:51 -0700
            Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-25 18:04 -0700
              Re: New features added into C23 standard Thiago Adams <thiago.adams@gmail.com> - 2022-07-25 19:23 -0700
                Re: New features added into C23 standard Opus <ifonly@youknew.org> - 2022-07-26 05:13 +0200
                  Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-25 23:36 -0400
                  Re: New features added into C23 standard Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-07-25 21:52 -0700
                  Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-26 11:44 -0700
                Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-26 11:39 -0700
            Re: New features added into C23 standard David Brown <david.brown@hesbynett.no> - 2022-07-30 14:42 +0200
              Re: New features added into C23 standard scott@slp53.sl.home (Scott Lurndal) - 2022-07-30 15:18 +0000
                Re: New features added into C23 standard Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-07-30 09:13 -0700
              Re: New features added into C23 standard Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-07-30 17:31 +0100
                Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-30 16:46 -0700
              Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-30 14:36 -0700
                Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-30 18:15 -0400
                  Re: New features added into C23 standard Kaz Kylheku <480-992-1380@kylheku.com> - 2022-07-30 23:28 +0000
                    Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-31 16:48 -0700
                      Re: New features added into C23 standard Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-07-31 22:42 -0700
                        Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-31 23:25 -0700
                          Re: New features added into C23 standard Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-08-01 00:10 -0700
                            Re: New features added into C23 standard David Brown <david.brown@hesbynett.no> - 2022-08-01 09:55 +0200
                        Re: New features added into C23 standard Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-08-01 20:17 +0100
                Re: New features added into C23 standard Kaz Kylheku <480-992-1380@kylheku.com> - 2022-07-30 23:21 +0000
          Re: New features added into C23 standard Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-07-25 22:59 -0700
            Re: New features added into C23 standard Öö Tiib <ootiib@hot.ee> - 2022-07-26 00:48 -0700
              Re: New features added into C23 standard Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-07-26 02:08 -0700
                Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-26 06:59 -0400
                Re: New features added into C23 standard Öö Tiib <ootiib@hot.ee> - 2022-07-26 04:02 -0700
                  Re: New features added into C23 standard Vir Campestris <vir.campestris@invalid.invalid> - 2022-07-29 21:18 +0100
                    Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-29 16:55 -0700
                Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-26 11:51 -0700
              Re: New features added into C23 standard David Brown <david.brown@hesbynett.no> - 2022-07-31 11:12 +0200
                Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-31 07:40 -0400
                  Re: New features added into C23 standard Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-07-31 17:40 +0100
                    Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-31 12:56 -0400
                      Re: New features added into C23 standard Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-07-31 19:28 +0100
                        Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-31 14:52 -0400
                          Re: New features added into C23 standard Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-07-31 21:35 +0100
                          Re: New features added into C23 standard Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-08-15 23:24 -0700
                        Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-31 16:57 -0700
                  Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-31 16:55 -0700
                    Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-31 20:09 -0400
                      Re: New features added into C23 standard Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-08-15 22:52 -0700
                        Re: New features added into C23 standard David Brown <david.brown@hesbynett.no> - 2022-08-16 09:21 +0200
                          Re: New features added into C23 standard Philipp Klaus Krause <pkk@spth.de> - 2022-08-16 09:32 +0200
                            Re: New features added into C23 standard David Brown <david.brown@hesbynett.no> - 2022-08-16 11:06 +0200
                  Re: New features added into C23 standard Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-08-15 23:17 -0700
                    Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-08-17 20:11 -0400
                      Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-08-17 20:08 -0700
                        Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-08-17 23:19 -0400
                          Re: New features added into C23 standard Kaz Kylheku <480-992-1380@kylheku.com> - 2022-08-18 07:03 +0000
                      Re: New features added into C23 standard Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-08-23 09:43 -0700
                        Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-08-23 11:02 -0700
                          Re: New features added into C23 standard Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-08-23 13:40 -0700
            Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-26 07:04 -0400
              Re: New features added into C23 standard Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-07-26 05:24 -0700
                Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-26 22:30 -0400
                  Re: New features added into C23 standard Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-07-29 00:02 +0100
                    Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-28 21:20 -0400
                      Re: New features added into C23 standard William Ahern <william@25thandClement.com> - 2022-07-28 19:36 -0700
                        Re: New features added into C23 standard scott@slp53.sl.home (Scott Lurndal) - 2022-07-29 16:39 +0000
                        Re: New features added into C23 standard Richard Damon <Richard@Damon-Family.org> - 2022-07-29 18:55 -0400
                      Re: New features added into C23 standard Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-07-29 15:17 +0100
            Re: New features added into C23 standard scott@slp53.sl.home (Scott Lurndal) - 2022-07-26 13:27 +0000
            Re: New features added into C23 standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-07-26 11:47 -0700
              Re: New features added into C23 standard Kaz Kylheku <480-992-1380@kylheku.com> - 2022-07-26 20:27 +0000
                Re: New features added into C23 standard Philipp Klaus Krause <pkk@spth.de> - 2022-08-16 08:42 +0200
    Re: New features added into C23 standard Bonita Montero <Bonita.Montero@gmail.com> - 2022-07-26 05:37 +0200
      Re: New features added into C23 standard Lynn McGuire <lynnmcguire5@gmail.com> - 2022-07-28 16:47 -0500
        Re: New features added into C23 standard Bonita Montero <Bonita.Montero@gmail.com> - 2022-07-29 07:14 +0200
          Re: New features added into C23 standard Vir Campestris <vir.campestris@invalid.invalid> - 2022-07-29 21:21 +0100
    Re: New features added into C23 standard Grant Mulholland <grantlmul@gmail.com> - 2022-08-13 22:21 -0700
      Re: New features added into C23 standard Lynn McGuire <lynnmcguire5@gmail.com> - 2022-08-15 21:21 -0500
        Re: New features added into C23 standard Bonita Montero <Bonita.Montero@gmail.com> - 2022-08-16 08:39 +0200
      Re: New features added into C23 standard Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-08-15 22:54 -0700
      Re: New features added into C23 standard Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-08-18 12:03 -0700
        Re: New features added into C23 standard "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-08-18 12:56 -0700
        Re: New features added into C23 standard William Ahern <william@25thandClement.com> - 2022-08-18 16:07 -0700
          Re: New features added into C23 standard Thiago Adams <thiago.adams@gmail.com> - 2022-08-18 18:47 -0700
            Re: New features added into C23 standard Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-08-18 20:23 -0700

Page 5 of 5 — ← Prev page 1 2 3 4 [5]


#167038

FromBonita Montero <Bonita.Montero@gmail.com>
Date2022-08-16 08:39 +0200
Message-ID<tdfe07$76g$1@dont-email.me>
In reply to#167033
Am 16.08.2022 um 04:21 schrieb Lynn McGuire:
> On 8/14/2022 12:21 AM, Grant Mulholland wrote:
>> On Friday, July 22, 2022 at 2:32:12 PM UTC-5, Thiago Adams wrote:
>>> - nullptr
>>> - typed enumerations
>>> - improved normal enumerations
>>> - Comma omission and comma deletion
>>> - constexpr
>>> - auto
>>> - TIME_MONOTONIC
>>> - bit-precise bit-fields
>>> - relaxed requirements for variadic parameter lists
>>> - embed
>>> ...
>> Good lord, auto in C...
> 
> I don't like it in C++ either.

Sometimes it's simply necessary.
You can't have a statically typed lambda.
You can't know the type of an object returned by bind().

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


#167035

FromTim Rentsch <tr.17687@z991.linuxsc.com>
Date2022-08-15 22:54 -0700
Message-ID<8635dwvilc.fsf@linuxsc.com>
In reply to#167028
Grant Mulholland <grantlmul@gmail.com> writes:

> On Friday, July 22, 2022 at 2:32:12 PM UTC-5, Thiago Adams wrote:
>
>> - nullptr
>> - typed enumerations
>> - improved normal enumerations
>> - Comma omission and comma deletion
>> - constexpr
>> - auto
>> - TIME_MONOTONIC
>> - bit-precise bit-fields
>> - relaxed requirements for variadic parameter lists
>> - embed
>> ...
>
> Good lord, auto in C...

Sadly, it seems the disease that has turned C++ into a
wasteland has been transmitted to the people responsible
for the C standard.

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


#167056

FromAndrey Tarasevich <andreytarasevich@hotmail.com>
Date2022-08-18 12:03 -0700
Message-ID<tdm2dv$14v8h$1@dont-email.me>
In reply to#167028
On 8/13/2022 10:21 PM, Grant Mulholland wrote:
> On Friday, July 22, 2022 at 2:32:12 PM UTC-5, Thiago Adams wrote:
>> - nullptr
>> - typed enumerations
>> - improved normal enumerations
>> - Comma omission and comma deletion
>> - constexpr
>> - auto
>> - TIME_MONOTONIC
>> - bit-precise bit-fields
>> - relaxed requirements for variadic parameter lists
>> - embed
>> ...
> Good lord, auto in C...

It is just another message to those who insist on explicitly casting the 
result of `malloc`, use types under `sizeof` or keep scattering 
unnecessary references to type names in their code in many other ways, 
because it allegedly "helps them to remember which types they are 
working with". It is clear that C and C++ are gravitating towards 
type-agnostic programming paradigm. Specific type names belong in 
declarations and nowhere else. "Remembering which types you are working 
with" is a crutch, and it is time to learn walking without crutches. Try 
it, it feels scary at first, but it is much more efficient.

-- 
Best regards,
Andrey

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


#167057

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2022-08-18 12:56 -0700
Message-ID<tdm5ic$1592o$1@dont-email.me>
In reply to#167056
On 8/18/2022 12:03 PM, Andrey Tarasevich wrote:
> On 8/13/2022 10:21 PM, Grant Mulholland wrote:
>> On Friday, July 22, 2022 at 2:32:12 PM UTC-5, Thiago Adams wrote:
>>> - nullptr
>>> - typed enumerations
>>> - improved normal enumerations
>>> - Comma omission and comma deletion
>>> - constexpr
>>> - auto
>>> - TIME_MONOTONIC
>>> - bit-precise bit-fields
>>> - relaxed requirements for variadic parameter lists
>>> - embed
>>> ...
>> Good lord, auto in C...
> 
> It is just another message to those who insist on explicitly casting the 
> result of `malloc`, use types under `sizeof` or keep scattering 
> unnecessary references to type names in their code in many other ways, 
> because it allegedly "helps them to remember which types they are 
> working with". It is clear that C and C++ are gravitating towards 
> type-agnostic programming paradigm. Specific type names belong in 
> declarations and nowhere else. "Remembering which types you are working 
> with" is a crutch, and it is time to learn walking without crutches. Try 
> it, it feels scary at first, but it is much more efficient.

A C programmer who refuses to try C++, ever... A C++ diehard says: Try 
C++, or you will get to experience the more "stringent" whipping implement:

https://youtu.be/BdkgV3MFkr0?t=28

;^)

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


#167058

FromWilliam Ahern <william@25thandClement.com>
Date2022-08-18 16:07 -0700
Message-ID<fbt2ti-c5e2.ln1@wilbur.25thandClement.com>
In reply to#167056
Andrey Tarasevich <andreytarasevich@hotmail.com> wrote:
> On 8/13/2022 10:21 PM, Grant Mulholland wrote:
>> On Friday, July 22, 2022 at 2:32:12 PM UTC-5, Thiago Adams wrote:
>>> - nullptr
>>> - typed enumerations
>>> - improved normal enumerations
>>> - Comma omission and comma deletion
>>> - constexpr
>>> - auto
>>> - TIME_MONOTONIC
>>> - bit-precise bit-fields
>>> - relaxed requirements for variadic parameter lists
>>> - embed
>>> ...
>> Good lord, auto in C...
> 
> It is just another message to those who insist on explicitly casting the 
> result of `malloc`, use types under `sizeof` or keep scattering 
> unnecessary references to type names in their code in many other ways, 
> because it allegedly "helps them to remember which types they are 
> working with".

auto wouldn't work with malloc. Relatedly, typeof is missing from the list;
it's in the working draft, N3047, though.

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


#167061

FromThiago Adams <thiago.adams@gmail.com>
Date2022-08-18 18:47 -0700
Message-ID<c28c99f5-5dcb-4965-9cab-244465109936n@googlegroups.com>
In reply to#167058
On Thursday, August 18, 2022 at 8:15:30 PM UTC-3, William Ahern wrote:
> Andrey Tarasevich <andreyta...@hotmail.com> wrote: 
> > On 8/13/2022 10:21 PM, Grant Mulholland wrote: 
> >> On Friday, July 22, 2022 at 2:32:12 PM UTC-5, Thiago Adams wrote: 
> >>> - nullptr 
> >>> - typed enumerations 
> >>> - improved normal enumerations 
> >>> - Comma omission and comma deletion 
> >>> - constexpr 
> >>> - auto 
> >>> - TIME_MONOTONIC 
> >>> - bit-precise bit-fields 
> >>> - relaxed requirements for variadic parameter lists 
> >>> - embed 
> >>> ... 
> >> Good lord, auto in C... 
> > 
> > It is just another message to those who insist on explicitly casting the 
> > result of `malloc`, use types under `sizeof` or keep scattering 
> > unnecessary references to type names in their code in many other ways, 
> > because it allegedly "helps them to remember which types they are 
> > working with".
> auto wouldn't work with malloc. Relatedly, typeof is missing from the list; 
> it's in the working draft, N3047, though.

>auto wouldn't work with malloc. 
like this?

auto p = (struct X*)malloc(sizeof(struct X));

this list has only the last additions.





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


#167063

FromAndrey Tarasevich <andreytarasevich@hotmail.com>
Date2022-08-18 20:23 -0700
Message-ID<tdmvoa$1ak0k$1@dont-email.me>
In reply to#167061
On 8/18/2022 6:47 PM, Thiago Adams wrote:
> 
>> auto wouldn't work with malloc.
> like this?
> 
> auto p = (struct X*)malloc(sizeof(struct X));
> 
> this list has only the last additions.
> 

You don't need `auto` with `malloc`, since the idiomatic pattern for the 
typical usage of `malloc` looks as follows

   ptr = malloc(sizeof *ptr);
   array = malloc(N * sizeof *array);

It is already sufficiently type-agnostic anyway.

-- 
Best regards,
Andrey

[toc] | [prev] | [standalone]


Page 5 of 5 — ← Prev page 1 2 3 4 [5]

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


csiph-web