Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.c > #387529

Re: technology discussion → does the world need a "new" C ?

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: technology discussion → does the world need a "new" C ?
Date 2024-08-12 15:36 -0700
Organization A noiseless patient Spider
Message-ID <867ccl2ws9.fsf@linuxsc.com> (permalink)
References (4 earlier) <v68dsm$37sg2$1@dont-email.me> <87wmlzvfqp.fsf@nosuchdomain.example.com> <v6ard1$3ngh6$4@dont-email.me> <v6c2d7$3tko2$2@dont-email.me> <v6c3s3$3tl33$2@dont-email.me>

Show all headers | View raw


bart <bc@freeuk.com> writes:

> On 06/07/2024 19:28, James Kuyper wrote:
[...]

>> It is that conversion [from array designator to a pointer to the
>> first element of the array] which creates the illusion of array
>> indexing, but since it's been converted to a pointer, it is
>> actually pointer indexing.
>
> Isn't that how all languages work 'under the hood'?

First, no, it isn't.

Second, it's the wrong way to think about it.  People who always
think about what's going on 'under the hood' are forever doomed
to program in a glorified assembly language.  The big problem of
programming in assembly language is it doesn't scale.  Any program
above a certain size must develop and build on abstractions for it
to be developed effectively.  Constantly thinking is assembly
language greatly interferes with that.

> The net affect from the user's point of view is that you have an
> array object, and use 'indexing' to access its individual
> elements.

That's wrong.  For some users, sure.  But not all, and not "the
user".  Beginners may think of it that way, but more experienced
C developers do not, at least not always.  This is why it's
important that descriptions of how C works not disguise these
details, because it will have the effect of confusing beginning
programmers and likely slowing down their understanding, which
ultimately is a disservice to the C programming community.

You should feel free to think any way you like.  But it's wrong
to insist that everyone else thinks the way you do.  They don't.

Back to comp.lang.c | Previous | Next | Find similar


Thread

Re: technology discussion → does the world need a "new" C ? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-08-12 15:36 -0700

csiph-web