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

Liste des GroupesRevenir à cl c 
Sujet : Re: technology discussion → does the world need a "new" C ?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.c
Date : 10. Jul 2024, 12:27:09
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240710042117.423@kylheku.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-07-10, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Sat, 06 Jul 2024 15:23:47 -0700, Keith Thompson wrote:
>
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
On Fri, 05 Jul 2024 11:46:38 -0700, Keith Thompson wrote:
>
No, arrays are not pointers.
>
Except array indexing is designed to be indistinguishable from pointer
arithmetic.
 
No, arrays are not pointers.
>
Can you point out any situation where this construct
>
    &a[b]
>
might be valid, but this
>
    (a + b)
>
(with the same declarations of “a” and “b”) might not?

Miller Genuine Daft at work again.

a[b] /means/ *(a + (b)) so your reasoning is circular.

Arrays are not pointers. Given arrays a and b of equal size:

- sizeof a is not sizeof &[0] other than by coincidence

- &a is not &a[0] -- different type

- a = b is invalid -- arrays are not modifiable lvalues

- arrays cannot be passed to functions nor returned;
  pointers can.

- int (f[3])(void) { }, function returning array of 3 int,
  is a constraint violation.
 
--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Date Sujet#  Auteur
6 Jul 24 * Re: technology discussion → does the world need a "new" C ?256Lawrence D'Oliveiro
6 Jul 24 +* Re: technology discussion → does the world need a "new" C ?240BGB
6 Jul 24 i+- Re: technology discussion → does the world need a "new" C ?1BGB
6 Jul 24 i+* Re: technology discussion → does the world need a "new" C ?10James Kuyper
9 Jul 24 ii`* Re: technology discussion → does the world need a "new" C ?4David Brown
9 Jul 24 ii `* Re: technology discussion → does the world need a "new" C ?3Michael S
9 Jul 24 ii  +- Re: technology discussion → does the world need a "new" C ?1David Brown
9 Jul 24 ii  `- Re: technology discussion → does the world need a "new" C ?1BGB
6 Jul 24 i`* Re: technology discussion → does the world need a "new" C ?228Keith Thompson
7 Jul 24 i +* Re: technology discussion → does the world need a "new" C ?223BGB
7 Jul 24 i i`* Re: technology discussion → does the world need a "new" C ?222James Kuyper
7 Jul 24 i i `- Re: technology discussion → does the world need a "new" C ?221BGB
10 Jul 24 i `* Re: technology discussion → does the world need a "new" C ?4Lawrence D'Oliveiro
10 Jul 24 i  +- Re: technology discussion → does the world need a "new" C ?1Keith Thompson
10 Jul 24 i  `* Re: technology discussion → does the world need a "new" C ?2James Kuyper
10 Jul 24 i   `- Re: technology discussion → does the world need a "new" C ?1Kaz Kylheku
6 Jul 24 +* Re: technology discussion → does the world need a "new" C ?9James Kuyper
6 Jul 24 i+* Re: technology discussion → does the world need a "new" C ?5bart
10 Jul 24 ii+- Re: technology discussion → does the world need a "new" C ?1Lawrence D'Oliveiro
10 Jul 24 ii+* Re: technology discussion → does the world need a "new" C ?2James Kuyper
10 Jul 24 iii`- Re: technology discussion → does the world need a "new" C ?1bart
12 Aug 24 ii`- Re: technology discussion → does the world need a "new" C ?1Tim Rentsch
6 Jul 24 i`* Re: technology discussion → does the world need a "new" C ?3Keith Thompson
7 Jul 24 i `* Re: technology discussion → does the world need a "new" C ?2James Kuyper
7 Jul 24 i  `- Re: technology discussion → does the world need a "new" C ?1Keith Thompson
6 Jul 24 `* Re: technology discussion → does the world need a "new" C ?6Keith Thompson
10 Jul 24  `* Re: technology discussion → does the world need a "new" C ?5Lawrence D'Oliveiro
10 Jul 24   +- Re: technology discussion → does the world need a "new" C ?1James Kuyper
10 Jul 24   +- Re: technology discussion → does the world need a "new" C ?1Keith Thompson
10 Jul 24   `* Re: technology discussion → does the world need a "new" C ?2Kaz Kylheku
10 Jul 24    `- Re: technology discussion → does the world need a "new" C ?1Ben Bacarisse

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal