| Deutsch English Français Italiano |
|
<vm9dft$353n1$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Thomas Koenig <tkoenig@netcologne.de> Newsgroups: comp.arch Subject: Re: Segments Date: Wed, 15 Jan 2025 22:39:57 -0000 (UTC) Organization: A noiseless patient Spider Lines: 29 Message-ID: <vm9dft$353n1$1@dont-email.me> References: <vdlgl9$3kq50$2@dont-email.me> <vdtmv9$16lu8$1@dont-email.me> <2024Oct6.150415@mips.complang.tuwien.ac.at> <vl7m2b$6iat$1@paganini.bofh.team> <2025Jan3.093849@mips.complang.tuwien.ac.at> <vlcddh$j2gr$1@paganini.bofh.team> <2025Jan5.121028@mips.complang.tuwien.ac.at> <vleuou$rv85$1@paganini.bofh.team> <ndamnjpnt8pkllatkdgq9qn2turaao1f0a@4ax.com> <2025Jan6.092443@mips.complang.tuwien.ac.at> <vlgreu$1lsr9$1@dont-email.me> <vlhjtm$1qrs5$1@dont-email.me> <bdZeP.23664$Hfb1.16566@fx46.iad> <vlj1pg$25p0e$1@dont-email.me> <87cygo97dl.fsf@nosuchdomain.example.com> <vm7mvi$2rr87$1@dont-email.me> <878qrb92jp.fsf@nosuchdomain.example.com> Injection-Date: Wed, 15 Jan 2025 23:39:57 +0100 (CET) Injection-Info: dont-email.me; posting-host="3f576d46d3292b56beeb5f9a317496c5"; logging-data="3313377"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+kkNDhRr6+3bzSUrXvhj9uX/Vgsp59FA=" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:KMtIuoJSnF93fVc4Mq1Ml1CRTjs= Bytes: 2624 Keith Thompson <Keith.S.Thompson+u@gmail.com> schrieb: > Thomas Koenig <tkoenig@netcologne.de> writes: >> Keith Thompson <Keith.S.Thompson+u@gmail.com> schrieb: >>> Thomas Koenig <tkoenig@netcologne.de> writes: >>> [...] >>>> CHERY targets C, which on the one hand, I understand (there's a >>>> ton of C code out there), but trying to retrofit a safe memory >>>> model onto C seems a bit awkward - it might have been better to >>>> target a language which has arrays in the first place, unlike C. >>> [...] >>> >>> C does have arrays. >> >> Sort of - they decay into pointers at first sight. > > In most but not all contexts. For example, `sizeof arr` yields the size > of the array, not the size of a pointer. Jep. >> But what I should have written was "multi-dimensional arrays", >> with a reasonable way of handling them. > > In C, multidimensional arrays are nothing more or less than arrays of > arrays. You can also build data structures using pointers that are > accessed using the same a[i][j] syntax as is used for a multidimensional > array. And yes, they can be difficult to work with. A pointer forest is also Not Good (TM) for efficiency...