The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: stewart@serissa.com (Lawrence Stewart)
Subject: [TUHS] C declarations.
Date: Sat, 13 May 2017 21:59:57 -0400	[thread overview]
Message-ID: <57639684-050B-4995-859F-876CAFE4BE9C@serissa.com> (raw)
In-Reply-To: <20170513124247.GG9980@yeono.kjorling.se>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

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.

-L

PS  

* - 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.



  parent reply	other threads:[~2017-05-14  1:59 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 21:49 Ron Natalie
2017-05-11 22:01 ` Arthur Krewat
2017-05-11 23:44   ` Dave Horsfall
2017-05-11 22:03 ` David Arnold
2017-05-11 22:32   ` Larry McVoy
2017-05-11 22:41     ` Ron Natalie
2017-05-13  1:24       ` Larry McVoy
2017-05-13  2:45         ` Ron Natalie
2017-05-13 12:20           ` Michael Kjörling
2017-05-13 12:35             ` Tim Bradshaw
2017-05-13 12:42               ` Michael Kjörling
2017-05-13 15:36                 ` Stephen Kitt
2017-05-14  1:59                 ` Lawrence Stewart [this message]
2017-05-14  2:23                   ` Dave Horsfall
2017-05-14  4:24                   ` Bakul Shah
2017-05-14  6:12                     ` Steve Johnson
2017-05-14  6:48                       ` Bakul Shah
2017-05-14 23:06                         ` Ron Natalie
2017-05-14 23:34                           ` Arthur Krewat
2017-05-15  0:14                             ` Dan Cross
2017-05-15  0:23                               ` Ron Natalie
2017-05-15  3:43                                 ` Random832
2017-05-15  0:40                               ` Larry McVoy
2017-05-15  2:00                                 ` Nevin Liber
2017-05-15 10:21                                 ` Tony Finch
2017-05-15  4:35                     ` Dave Horsfall
2017-05-15  4:54                       ` Bakul Shah
2017-05-15  5:01                         ` Dave Horsfall
2017-05-15 12:58                       ` Michael Kjörling
2017-05-15 16:58                         ` Dave Horsfall
2017-05-15 19:00                           ` [TUHS] cdecl (Re: " Bakul Shah
2017-05-15 22:52                             ` Dave Horsfall
2017-05-13 13:46               ` [TUHS] " Hellwig Geisse
2017-05-13 19:08               ` Random832
2017-05-13 23:21                 ` Dave Horsfall
2017-05-14 14:48                   ` Nemo
2017-05-13 19:05             ` Random832
2017-05-14 13:14               ` Derek Fawcus
2017-05-12  0:15     ` Bakul Shah
2017-05-12  2:41       ` Theo Pavlidis
2017-05-12 14:04 Richard Tobin
2017-05-13 23:11 Richard Tobin
2017-05-15  6:46 ` Tim Bradshaw
2017-05-14 14:11 Doug McIlroy
2017-05-14 14:58 ` Steve Nickolas
2017-05-15 18:47 Steve Johnson
2017-05-15 19:54 ` Bakul Shah
2017-05-16  7:25 ` George Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57639684-050B-4995-859F-876CAFE4BE9C@serissa.com \
    --to=stewart@serissa.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).