Earlier quoted context omitted.
What is **int[3][5]
A syntax error. You need a variable name, not a type name, in the middle.
C array types are weird
21–30 of 148 posts
Re: C array types are weird
#22[flagged]
Re: C array types are weird
#23So in short, the bad design (array values produce pointers) was informed by conceptual compability with an earlier design in which that was literally happening.
Re: C array types are weird
#24Re: C array types are weird
#25Earlier quoted context omitted.
https://www.tiobe.com/tiobe-index/
As always, the TIOBE Index is of dubious value. The fact that it ranks Delphi above both Go and Rust should give you an idea of why.
Re: C array types are weird
#26But if you designed a language in the era where Fortran, THE array language, reigned supreme, nobody would use your language. The mindshare Fortran had is difficult to convey now, half a century later.
Think of it like making a chatbot today and not mentioning AI or LLMs, that's what making a language without arrays would have felt like in 1970.
Re: C array types are weird
#27Re: C array types are weird
#28Earlier quoted context omitted.
This talk – "Programming without pointers" – by Andrew Kelley may be interesting to you. https://www.hytradboi.com/2025/05c72e39-c07e-41bc-ac40-85e83...
Learning to program with pointers is enormously useful. It's simply bad software engineering to not use typing to enforce constraints on access to pointers (or addresses, or however you'd like to term them)
Re: C array types are weird
#29Paging walter bright
C's biggest mistake. But in other news most don't know that a[3] == 3[a]
https://stackoverflow.com/a/16163840
In C a[i] is converted to *(a+i) internally. i[a] is converted to *(i+a). Array names also act as pointers in c. so (a+i) or (i+a) give an address (using pointer arithmetic) that is dereferenced using
Re: C array types are weird
#30Paging walter bright
C's biggest mistake. But in other news most don't know that a[3] == 3[a]