Article View: comp.lang.c
Article #2167Re: Iterators over slices and views and ranges analogs in C
From: Ross Finlayson
Date: Fri, 04 Dec 2026 07:22
Date: Fri, 04 Dec 2026 07:22
46 lines
3138 bytes
3138 bytes
On 12/03/2026 04:59 PM, Kenny McCormack wrote: > In article <11esd12$mfam$1@raubtier-asyl.eternal-september.org>, > Bonita Montero <Bonita.Montero@gmail.com> wrote: >> Better use C++ for what you want to do. > > Or Fortran. > > Or 8086 assembler. > > All better choices. > Browsing about the video pile for "iterators in C" there's a "Charles Severance" walks through what would be the usual sort of textbook example called "K & R" of "iterators in C". (I have a copy in my library of C and C++ books.) That Severance has quite a few good sorts of interviews and educations there from the video pile. Here the approach instead is about this viter/witer approach then for titer/uiter, with looking to align the state & change in, say, cache-line pairs, when for example the buffers are one of C_LINE/C_PAIR or M_PAGE/M_HUGE size, since a usual idea is that instead of linked-lists scattered throughout the heap which has random access, that mostly the data is in memory pages, those then carved from a slab, .... Getting that organized the viter/witer then titer/uiter, or the view-iter, write-iter, then tuple-view and tuple-write and unsigned-view and unsigned-write iters, seems a good idea since it's mostly always so that they're one or the other. It's agreeable that something like FORTRAN may be better for array-type languages, about though "array-languages" also there are a bunch of those like "APL" and this, here though there's considered a sort of least-common-denominator of a "C" compiler, if though writing only to a subset of the language.
Technical Details
Message-ID:
<gWGdndhHmaii94_2nZ2dnZfqn_SdnZ2d@giganews.com>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-3.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<-kGdnSzB4bWEM4z2nZ2dnZfqn_WdnZ2d@giganews.com> <11esd12$mfam$1@raubtier-asyl.eternal-september.org> <11et39b$rj55$1@news.xmission.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-3.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 04 Dec 2026 07:22:39 +0000 Subject: Re: Iterators over slices and views and ranges analogs in C Newsgroups: comp.lang.c References: <-kGdnSzB4bWEM4z2nZ2dnZfqn_WdnZ2d@giganews.com> <11esd12$mfam$1@raubtier-asyl.eternal-september.org> <11et39b$rj55$1@news.xmission.com> From: Ross Finlayson <ross.a.finlayson@gmail.com> Date: Thu, 3 Dec 2026 23:22:13 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <11et39b$rj55$1@news.xmission.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <gWGdndhHmaii94_2nZ2dnZfqn_SdnZ2d@giganews.com> Lines: 46 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-w3QuDUwJB20vy2yNcP9hMIDR2UfSjoGLOWD2St0iYQjYfTGiqE2rHbNgXwadKSgZdNrkApZu9IhLqPP!1+9xCcSqWNoGTkw7h602G3vHNaT9wOsa3B9B6NECCeFt2JYC98jWOH6XgswjIeOJBe6NxrN37nJl X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40