Deutsch   English   Français   Italiano  
<87plrruvmt.fsf@nosuchdomain.example.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: technology discussion =?utf-8?Q?=E2=86=92?= does the world need
 a "new" C ?
Date: Fri, 05 Jul 2024 19:00:58 -0700
Organization: None to speak of
Lines: 27
Message-ID: <87plrruvmt.fsf@nosuchdomain.example.com>
References: <v66eci$2qeee$1@dont-email.me> <v67gt1$2vq6a$2@dont-email.me>
	<v687h2$36i6p$1@dont-email.me> <v68sjv$3a7lb$1@dont-email.me>
	<v6a76q$3gqkm$6@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 06 Jul 2024 04:00:59 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4fb51dea6b50f38f3e7769a7b5a0e792";
	logging-data="3827531"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX185vpjCOQiFEv3zZ1EBR4of"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:fyNbG2YMcvMn52AQwYkYXrIDA9k=
	sha1:Fv9QZyqll5FqICb5OvRjzTccOCI=
Bytes: 2281

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Fri, 5 Jul 2024 14:31:44 +0100, bart wrote:
>
>> C also is the only language that is supposed to work on any kind of
>> processor ...
>
> I don’t think there is anything innate in the design of C to ensure that. 
> It was simply its popularity that meant it was usually the first language 
> implemented on a new processor.
>
> For example, C assumes byte addressability. So that causes awkwardness on 
> architectures like the PDP-10, for example. It just so happened such 
> architectures became extinct at about the time the rise of 8-bit 
> microprocessors (and their more advanced successors) made byte-
> addressability essentially universal.

C assumes byte addressibility, but it doesn't assume that bytes are 8
bits.

The PDP-10 had 36-bit words and could operate on bit fields of any size
from 1 to 36 bits.  A conforming PDP-10 C compiler might have
CHAR_BIT==9, for example.  But yes, it would be awkward to deal with
arrays of 6-bit quantities.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */