🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #2218

Re: Iterators over slices and views and ranges analogs in C

#2218
From: Keith Thompson
Date: Fri, 04 Dec 2026 23:00
33 lines
2844 bytes
Ross Finlayson <ross.a.finlayson@gmail.com> writes:
> On 12/04/2026 08:33 AM, David Brown wrote:
>> On 04/12/2026 16:21, Ross Finlayson wrote:
[...]
>>> There's _Generic which some say is C99
>>
>> Nobody says that _Generic is in C99.  It was added to C in C11.

[...]

> Thanks for writing. The _Generic construct was implemented for quite
> a while before C11, yes that it's in C11.

Implemented by whom?  When?  In what release?

I would greatly appreciate a *brief* answer to these questions.
I expect your reply will include lengthy digressions, but please
include one short sentence or paragraph that clearly and directly
answers the questions I just asked.

I just took a look at gcc's git history.  The _Generic keyword did
not exist before commit 433cc7b037f, 2013-07-23.  The first release
with that change was 4.9.0, released 2014-04-22.

llvm/clang introduced _Generic in release 3.0.0, late 2011.

There are of course compilers other than gcc and clang, but it
certainly doesn't appear to be the case that _Generic was widely
implemented before the C11 standard was published.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Technical Details
Message-ID: <11evglo$241mc$1@kst.eternal-september.org>
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mail
References: <-kGdnSzB4bWEM4z2nZ2dnZfqn_WdnZ2d@giganews.com> <11esd12$mfam$1@raubtier-asyl.eternal-september.org> <11et39b$rj55$1@news.xmission.com> <11ett3b$1a41p$1@dont-email.me> <11euadh$1gp4t$1@dont-email.me> <11euckd$1ht9i$1@raubtier-asyl.eternal-september.org> <11eugtg$erg$4@dont-email.me> <11euj8b$1lhf1$1@dont-email.me> <i5-dnSCmSLz7R4_2nZ2dnZfqnPqdnZ2d@giganews.com> <11eupvu$1p0q1$1@dont-email.me> <0HydndKd_6bFbY_2nZ2dnZfqn_GdnZ2d@giganews.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Iterators over slices and views and ranges analogs in C
Date: Fri, 04 Dec 2026 15:00:08 -0800
Organization: None to speak of
Lines: 33
Message-ID: <11evglo$241mc$1@kst.eternal-september.org>
References: <-kGdnSzB4bWEM4z2nZ2dnZfqn_WdnZ2d@giganews.com>
	<11esd12$mfam$1@raubtier-asyl.eternal-september.org>
	<11et39b$rj55$1@news.xmission.com> <11ett3b$1a41p$1@dont-email.me>
	<11euadh$1gp4t$1@dont-email.me>
	<11euckd$1ht9i$1@raubtier-asyl.eternal-september.org>
	<11eugtg$erg$4@dont-email.me> <11euj8b$1lhf1$1@dont-email.me>
	<i5-dnSCmSLz7R4_2nZ2dnZfqnPqdnZ2d@giganews.com>
	<11eupvu$1p0q1$1@dont-email.me>
	<0HydndKd_6bFbY_2nZ2dnZfqn_GdnZ2d@giganews.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Fri, 04 Dec 2026 23:00:09 +0000 (UTC)
Injection-Info: kst.eternal-september.org;
	logging-data="2229964"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+vKeGU2rL+ZEq3dPLaLbX0"; posting-host="4d1c16dff22863d7addce8fd7811cba6"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:EzsU57qoMvszdPrb+Gru3FlDhVg= sha256:Ld/AAMgz0Ojz30Yvbaw7nIm49/m+6uPAL2I9PfxMHzo=
	sha1:el6vF5DyLl/J2A4sVmVm8mS/iQk= sha256:fs7sA5w9+wZVh587sjBjwRKkk3IQMUG4MeGbjaq54+8=