The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: brantleycoile@me.com (Brantley Coile)
Subject: [TUHS] Comments on "C"
Date: Wed, 31 Aug 2016 09:57:45 -0400	[thread overview]
Message-ID: <A93CB1E4-3643-4653-9A74-699BAAB3DEB9@me.com> (raw)
In-Reply-To: <CAOkr1zXkmRx7p1sET=a+1ffh=nSeh0G-vTDipiZPAjTbVVYQ_Q@mail.gmail.com>

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


> On Aug 28, 2016, at 8:37 PM, Marc Rochkind <rochkind at basepath.com> wrote:
> 
> But, as anyone who's actually programmed seriously in assembly language knows, C is not assembler. It is a system programming language low enough to be used for things that were once done in assembler, the most important of which is an OS.
> 
> So, for most of us, we no longer had to write in assembler. But that doesn't mean C is assembler.
> 

Interestingly, assembler seems to be making a come back if one gives any credence to the Tiobe index. http://www.tiobe.com/tiobe-index/ As one who has written a lot of assembler code and no small number of assemblers, I wouldn’t like to write in assembler again. The problem is the lack of redundancy to catch errors.

As you all know (preaching to the choir here) the semantic model for C is the common von Neumann architecture. With the exceptions of returning structures, the semantics map one to one with most machines. This means that I can write C code and know pretty well what instructions are going to be generated. This in turn means that I can use C for almost all cases where I would have had to use assembler. The great Niklaus Wirth demonstrated this with his Oberon and some other small languages that completely replaced the use of assembler in his systems.

Some modern compliers have broken this, however. I have never been able to figure out what clang is going to do. But I should expect 28,000,000 bytes of instructions to do weird things. There’s no reason a C compiler should ever be more than about 0.25 MB of text.

  Brantley Coile



  parent reply	other threads:[~2016-08-31 13:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-28 18:21 Dave Horsfall
2016-08-29  0:37 ` Marc Rochkind
2016-08-29  0:42   ` Larry McVoy
2016-08-29  1:54     ` Steve Nickolas
2016-09-08  1:19     ` Blake McBride
2016-08-29  3:16   ` Greg 'groggy' Lehey
2016-08-31 10:02     ` Tim Bradshaw
2016-08-31 12:59       ` John Cowan
2016-08-31 13:32         ` Ron Natalie
2016-08-31 14:37           ` John Cowan
2016-08-31 13:57   ` Brantley Coile [this message]
2016-09-01  9:17 Norman Wilson
2016-09-01 15:11 ` Clem Cole
2016-09-01 21:47 ` Tim Bradshaw
2016-09-02  0:11   ` Mary Ann Horton
2016-09-02  7:10     ` Steve Simon
2016-09-02 10:02       ` Steve Nickolas
2016-09-02 14:13       ` Random832
2016-09-02 21:23 ` Dave Horsfall
2016-09-04 17:03   ` scj
2016-09-05 13:07     ` Ron Natalie
2016-09-04 22:24   ` Nemo
2016-09-08 12:35 Doug McIlroy
2016-09-09 17:07 ` scj
2016-09-08 13:30 Noel Chiappa
2016-09-08 14:22 ` Tony Finch
2016-09-08 19:20   ` Ron Natalie
2016-09-08 22:06     ` Dave Horsfall
2016-09-09  3:02       ` Ronald Natalie
2016-09-09  6:06         ` Diomidis Spinellis
2016-09-09 21:15 ` Mary Ann Horton
2016-09-09  2:43 Doug McIlroy

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=A93CB1E4-3643-4653-9A74-699BAAB3DEB9@me.com \
    --to=brantleycoile@me.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).