Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: "marb...@yahoo.co.uk" Newsgroups: comp.compilers Subject: Re: another C-like language? was Compilers :) Date: Sat, 7 Jan 2023 02:14:51 -0800 (PST) Organization: Compilers Central Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <23-01-020@comp.compilers> References: <23-01-001@comp.compilers> <23-01-002@comp.compilers> <23-01-003@comp.compilers> <23-01-008@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="74083"; mail-complaints-to="abuse@iecc.com" Keywords: C, code, comment Posted-Date: 08 Jan 2023 13:55:54 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <23-01-008@comp.compilers> Xref: csiph.com comp.compilers:3289 > [If you're doing a one-pass compiler, it's easier if all the declarations are at the > beginning so you can generate the code to set up the stack frame and do initializations. > I agree that on modern computers it's not a big deal, but remember that early C compilers > ran in 24K bytes and I don't mean meagabytes. -John] Presumably such a compiler would have to create 2 stack frames for `char *foo="foo"; puts(foo); { char *bar="bar"; puts(bar); }` [In a mutant version of C with nested scopes, I suppose so, but when C compilers ran in 24K bytes, it didn't. -John]