Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Peace was the way. -- Kirk, "The City on the Edge of Forever", stardate unknown


devel / comp.compilers / Re: Scheme is not another C-like language? was Compilers :)

SubjectAuthor
o Re: Scheme is not another C-like language? was Compilers :)Nils M Holm

1
Re: Scheme is not another C-like language? was Compilers :)

<23-01-047@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=674&group=comp.compilers#674

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: nmh@t3x.org (Nils M Holm)
Newsgroups: comp.compilers
Subject: Re: Scheme is not another C-like language? was Compilers :)
Date: Thu, 12 Jan 2023 11:15:25 +0100
Organization: Compilers Central
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <23-01-047@comp.compilers>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="12337"; mail-complaints-to="abuse@iecc.com"
Keywords: Scheme, comment
Posted-Date: 12 Jan 2023 13:39:26 EST
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: Nils M Holm - Thu, 12 Jan 2023 10:15 UTC

Kaz Kylheku <864-117-4973@kylheku.com> wrote:
> I tried (lambda () (define x 42) (define x 43)) in a Scheme
> implementation and got an error about the duplicate variable.
>
> That's completely silly since it breaks the idea that the block scoped
> define can just be desugared to nested lets.

If I am not completely mistaken, local DEFINE expands to LETREC
and not to nested LET, so your example would result in two
instances of X in the same scope:

(lambda ()
(letrec ((x 42)
(x 43))))

--
Nils M Holm < n m h @ t 3 x . o r g > http://t3x.org
[See the more complete analysis just posted. -John]

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor