Deutsch   English   Français   Italiano  
<v6a2rs$3gd9u$1@dont-email.me>

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

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c
Subject: =?UTF-8?Q?Re:_technology_discussion_=e2=86=92_does_the_world_need_a?=
 =?UTF-8?Q?_=22new=22_C_=3f?=
Date: Sat, 6 Jul 2024 02:24:27 +0200
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <v6a2rs$3gd9u$1@dont-email.me>
References: <v66eci$2qeee$1@dont-email.me> <v67gt1$2vq6a$2@dont-email.me>
 <v687h2$36i6p$1@dont-email.me> <871q48w98e.fsf@nosuchdomain.example.com>
 <v68dsm$37sg2$1@dont-email.me> <87plrsultu.fsf@bsb.me.uk>
 <v68sft$3a6lh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 06 Jul 2024 02:24:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d68c331d25e5670ec21931262b250ab4";
	logging-data="3683646"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18C39vkFWCvH6IgRF9Ik+ef"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:9jx1GEXzOQrCR/wzXsE3Zwr0PXU=
In-Reply-To: <v68sft$3a6lh$1@dont-email.me>
X-Enigmail-Draft-Status: N1110
Bytes: 3459

On 05.07.2024 15:28, BGB wrote:
> 
> It is not so much a dislike of multidimensional arrays as a concept, but
> rather, the hair they add to the compiler and typesystem.
> 
> Granted, one would still have other complex types, like structs and
> function pointers, so potentially the complexity savings would be limited.
> 
> [...]
> 
> Though, the major goal for this sort of thing is mostly to try to limit
> the complexity required to write a compiler (as opposed to programmer
> convenience).
> 
> Like, for example, I had tried (but failed) to write a usable C compiler
> in less than 30k lines (and also ideally needing less than 4MB of RAM).
> But, if the language design is simplified some, this might be a little
> closer. Might still be doable, but a C compiler in 50-75k lines is much
> less impressive.
> 
> [...]

Well, when reading that there's immediately faint memories forming
in my mind about an (only 90 page) booklet of Nicklaus Wirth with
the title "Compilerbau" (don't know about English translations). It
illustrates how to construct a simple (Pascal like) compiler based
on a Recursive Descent parser. It's development is also implying a
bootstrap mechanism, IIRC. Given the large numbers of lines of code
you mention above this might be a sensible alternative. Maybe you
can find some stimulus for your project even if you started your
own project differently. Your above stated requirements to limit
the complexity of writing a compiler is certainly addressed there
in several ways; simple LL(1) parser, bootstrapping, table driven
approaches, complete but extensible language as an example, etc.

Janis

PS: Google found a PDF online[*] (which is obviously more extensive
than my 1st ed. book), so you can inspect it and inform yourself to
see whether it's of any use to you.

PPS: Note also that even if the book uses a Pascal-like design the
described mechanisms are not bound to that language. Use it for a
"C"-like language if you think that's a good idea. :-)

[*]
http://pascal.hansotten.com/uploads/books/Compiler%20Bau%20Nwirth%201986.pdf