Groups | Search | Server Info | Login | Register
Groups > comp.lang.c > #397398
| From | Michael S <already5chosen@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Why is this happening? |
| Date | 2026-04-07 02:05 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <20260407020558.000055ca@yahoo.com> (permalink) |
| References | (5 earlier) <CfSxR.24256$eG1.15763@fx33.iad> <86bjg72xl6.fsf@linuxsc.com> <87zf3rurp9.fsf@example.invalid> <86ldezzyx1.fsf@linuxsc.com> <877bqj4wh1.fsf@example.invalid> |
On Mon, 06 Apr 2026 14:20:26 -0700
Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> > Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> >> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> >>> scott@slp53.sl.home (Scott Lurndal) writes:
> >>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> >>>>> Lawrence D <<E2>> ??Oliveiro <ldo@nz.invalid> writes:
> >>>>>> On Fri, 27 Mar 2026 10:15:23 +0100, Josef M@C3{B6}llers wrote:
> >>>>>>
> >>>>>>> diffns += 1000000000UL;
> >>>>>>
> >>>>>> Can you write
> >>>>>>
> >>>>>> diffns += 1_000_000_000UL;
> >>>>>>
> >>>>>> yet?
> >>>>>
> >>>>> Not in C. C23 introduces the apostrophe as a digit separator,
> >>>>> copied from C++:
> >>>>>
> >>>>> diffns += 1'000'000'000UL;
> >>>>
> >>>> Or diffns += 1000ul * 1000ul * 1000ul;
> >>>>
> >>>> or diffns += 1 * NS_PER_SEC;
> >>>>
> >>>> with
> >>>> #define NS_PER_SEC ((1000ul * 1000ul * 1000ul))
> >>>>
> >>>>> (I would have preferred underscores, but that would have
> >>>>> conflicted with C++'s user-defined literals.)
> >>>>
> >>>> Likewise, I'd prefer the underscore.
> >>>
> >>> Ditto. And there is no reason C could have allowed both,
> >>> and C++ be damned.
> >>
> >> (I think you omitted a "not".)
> >
> > Yes, as I explained in a followup to myself.
> >
> >> Using apostrophes is IMHO far better than either allowing two
> >> arbitrarily distinct syntaxes or a gratuitous incompatibility
> >> with C++.
> >
> > One, it is not an incompatibility. It's an upward compatible
> > extension.
>
> Your proposal, I think, is for C to permit both apostrophes and
> underscores as digit separators. I suppose that's not strictly an
> "incompatibility", but it would mean that any code intended to be
> compiled as either C or C++ cannot use underscores.
>
> Your "C++ be damned" attitude is not shared by either language
> committee (fortunately, IMHO).
>
For C11 and C17 it was true.
But C23 has at least two new (or old new) incompatibilities with C++:
- VMT are again mandatory, like in C99
- _BitInt(N)
It sounds to me as a change of the attitude. Or may be a return to
pre-C11 attitude.
> > Two, it's not gratuitous. The extension is proposed because it
> > provides a positive value, and I'm not the only one who thinks
> > so.
>
> I disagree. I've already said that I would have preferred
> underscores over apostrophes, but both languages now use apostrophes.
> If C allowed both, there would be no firm basis for deciding which
> to use. It would make the language slightly more complicated,
> with no real benefit than I can see. The only thing I can think of
> that might be a "positive value" is that *some* programmers would
> be able to use a symbol that they think looks better.
>
> It would be similar to allowing programmers to use "begin" and "end"
> rather than "{" and "}". I'm sure some programmers would like that,
> but the result would be a mess.
>
> What positive value do you think permitting underscores would add?
>
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
Why is this happening? DFS <nospam@dfs.com> - 2026-03-27 00:12 -0400
Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-27 05:46 +0100
Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-27 06:01 +0100
Re: Why is this happening? DFS <nospam@dfs.com> - 2026-03-27 02:31 -0400
Re: Why is this happening? Josef Möllers <josef@invalid.invalid> - 2026-03-27 10:15 +0100
Re: Why is this happening? scott@slp53.sl.home (Scott Lurndal) - 2026-03-27 16:02 +0000
Re: Why is this happening? Josef Möllers <josef@invalid.invalid> - 2026-03-28 21:58 +0100
Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-29 14:30 +0200
Re: Why is this happening? scott@slp53.sl.home (Scott Lurndal) - 2026-03-29 18:56 +0000
Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-30 02:00 +0200
Re: Why is this happening? Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2026-03-30 00:41 +0100
Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-30 09:25 +0200
Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-30 11:23 +0300
Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-30 11:16 +0200
Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-30 13:06 +0300
Re: Why is this happening? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-28 01:46 +0000
Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-27 20:41 -0700
Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-28 05:17 +0100
Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-28 10:09 +0100
Re: Why is this happening? Bart <bc@freeuk.com> - 2026-03-28 11:33 +0000
Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-28 16:35 +0100
Re: Why is this happening? Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-28 16:56 +0000
Re: Why is this happening? Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-28 16:58 +0000
Re: Why is this happening? James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-28 19:24 -0400
Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-29 11:33 +0200
Re: Why is this happening? Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-29 16:30 +0100
Re: Why is this happening? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-29 10:37 -0700
Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-31 16:20 +0200
Re: Why is this happening? Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-31 17:19 +0100
Re: Why is this happening? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-29 13:19 -0700
Re: Why is this happening? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-29 13:26 -0700
Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-29 14:14 -0700
Re: Why is this happening? James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-29 20:47 -0400
Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-29 13:57 -0700
Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-31 16:26 +0200
Re: Why is this happening? scott@slp53.sl.home (Scott Lurndal) - 2026-03-28 15:14 +0000
Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-28 10:18 -0700
Re: Why is this happening? scott@slp53.sl.home (Scott Lurndal) - 2026-03-29 18:50 +0000
Re: Why is this happening? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-28 19:12 -0700
Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-28 22:31 -0700
Re: Why is this happening? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-06 12:11 -0700
Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-06 14:20 -0700
Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-04-07 02:05 +0300
Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-06 17:42 -0700
Re: Why is this happening? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-29 14:43 -0700
Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-29 11:50 +0300
Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-29 13:54 -0700
Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-30 02:05 +0300
Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-29 16:22 -0700
Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-30 10:57 +0300
Re: Why is this happening? James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-30 20:37 -0400
Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-31 11:48 +0300
Re: Why is this happening? James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-31 10:51 -0400
Re: Why is this happening? candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2026-03-31 19:00 +0000
Re: Why is this happening? Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-04-03 02:41 +0100
csiph-web