[TUHS] C declarations.
stewart at serissa.com
Sun May 14 11:59:57 AEST 2017
I am not troubled at all by C’s conflation of arrays and pointers. That has always seemed natural - it is what is really going on under the covers.*
I’m the sort of person who fiddles with the source code until the compiler generates the code I want. C is great for this. Not always, but C compilers usually do the straightforward and obvious thing and generate the code you would write if you had to do it in assembler, only the compiler keeps track of the stupid details like frame offsets and inventing symbol names for branch targets.
I’ve written substantive things in Java, Modula-3, common lisp, python, and so forth, but when I write performance sensitive code, I do it in C**
I tend to work on communications code and when you are counting cycles in some HPC library, you write in C but think of every load, store, and shift. My affinity for the language began the same way it probably did for a lot of people here: when I realized that *i++ was exactly a PDP11 addressing mode.
When the assistant rector at my church had a meeting about sacred texts, I brought in K&R (“the New Testament” second edition) and my prized copies of the BSTJ Unix issues.
* - But I have never been able to remember the syntax for function pointers. I always “man qsort” to refresh my memory.
** - If the code uses multidimensional arrays or subarrays, then maybe FORTRAN, because really x[i*stride+j] gets really old.
More information about the TUHS