Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Jonathan Lamothe Newsgroups: comp.lang.c Subject: Re: A thought of C Date: Tue, 14 Apr 2026 15:56:12 -0400 Organization: A noiseless patient Spider Lines: 83 Message-ID: <87bjfl48pv.fsf@posteo.de> References: <3a3462bdd72c4ed9d392a78b7d369a7b5ccc3b04.camel@gmail.com> <10rluf2$9ooq$1@dont-email.me> <4d73f54ada2ef60b199c9811703a0a6e2b1a132f.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 14 Apr 2026 19:56:13 +0000 (UTC) Injection-Info: dont-email.me; posting-host="802fe6a8d5b97504ac6764022e672b27"; logging-data="416069"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rFc3NRh60mIloWiGOg9E7gt66ycFgUdU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cancel-Lock: sha1:+8mEW93OhT0GS3nzOGB+Zrudzkg= sha1:ky82aCg4WDgbQ+UpSu68njO+e7U= Xref: csiph.com comp.lang.c:397528 wij writes: > On Tue, 2026-04-14 at 18:45 +0100, Bart wrote: >> On 14/04/2026 15:47, wij wrote: >> > In attempting writting a simple language, I had a thought of what language is >> > to share. Because I saw many people are stuck in thinking C/C++ (or other >> > high level language) can be so abstract, unlimited 'high level' to mysteriously >> > solve various human description of idea. >> > >> > C and assembly are essentially the same, maybe better call it 'portable assembly'. >> > In C, we don't explicitly specify how wide the register/memory unit is, we use >> > char/int (short/long, signed/unsigned) to denote the basic unit. I.e. >> > >> >    a=b;   // equ. to "mov a,b" >> >> What C's 'a=b' equates to in assembly could be anything, depending on >> target machine, the types of 'a' and 'b', their scopes and linkage, the >> compiler used, and the optimisation levels employed. >> >> > >> > The 2nd difference: Assembly contains too many burdomsom labels. In C, we use >> > 'structure', for example: >> > >> >    while(a> >      a+=1; >> >    }              // '}' is an implicit label >> > >> >    if(a> >    } else {       // '{', '}' are implicit labels >> >    }              // ditto >> > >> > The 3rd difference: Function calling convention in C is reentrance-able (mostly). >> > >> > The 4th difference: Local variable. >> > (Assembly can theoritically do the same but I don't have impression which one >> > support this feature.) >> >> >> So basically, C and Assembly are NOT essentially the same. C has far >> more abstractions: it is a HLL. > > Anyway, IMO, 'portable assembly' is more descriptive. > 'High-Level Language' is anyone's interpretation (prone to mis-interpretation and > misunderstanding). > > 'Assembly' can also be like C: > > // This is 'assembly' > def int=32bit; // Choose right bits for your platform, or leave it for > def char= 8bit; // compiler to decide. > > int a; > char b; > a=b; // allow auto promotion > > while(a a+=1; > } > > You also can call the above example 'C'. If so, you still have to know how wide > int/char is (Not rare. programmers often struggle which size to use) while > writing "a=b", eventually. What the 'abstracton' really mean? Maybe, eventually > back to int32_t and int8_t after long theoretical/phillisophical pondering? > > HHL is just 'style' in favor of specific purpose than the other for me. I am not > saying it is wrong, instead it is very helpful (measured by actuall effort and > gain). > >> And actually, there are at least a couple of language levels I've used >> that sit between Assembly and C. > > While I'll grant you that "high-level" is a subjective term, I don't know that "portable assembly" is quite right either (and also a bit of an oxymoron). That said, I think we're splitting hairs here. -- Regards, Jonathan Lamothe https://jlamothe.net