Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Duplicate identifiers in let - difference between CL and Scheme

Received: by 10.224.117.143 with SMTP id r15mr5773381qaq.1.1350906369647;
        Mon, 22 Oct 2012 04:46:09 -0700 (PDT)
Received: by 10.52.91.109 with SMTP id cd13mr1211263vdb.15.1350906369624; Mon,
 22 Oct 2012 04:46:09 -0700 (PDT)
Path: r17ni43198318qap.0!nntp.google.com!x14no4171446qar.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.lisp
Date: Mon, 22 Oct 2012 04:46:09 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=130.138.227.54;
 posting-account=Ja-9QQoAAADZe06iJOhg2zmG_t2SluVG
NNTP-Posting-Host: 130.138.227.54
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f6046c45-e9ff-4b56-b541-73ea56c47bdc@googlegroups.com>
Subject: Duplicate identifiers in let - difference between CL and Scheme
From: jurgen_defurne <jurgen.defu...@pandora.be>
Injection-Date: Mon, 22 Oct 2012 11:46:09 +0000
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello,

While trying out some things, I noticed there is a big difference in interp=
retation between CL and Scheme for the following expression:

(let ((a 100)
      (a 200))
  (print a)) ;;e.g.

In Common Lisp the value 200 is printed, in Scheme an error occurs.

Is this for backwards compatibility of CL with older Lisps, is this to make=
 it easier to implement, or are there other reasons?

I must say that I have already written some programs in Common Lisp, some n=
ot so easy, e.g. a simulation of microprocessor on the signal level, and I =
have not had the problem that I by accident created variables with almost t=
he same name, and then had typos. Common Lisp invites for a strong decompos=
ition, which together with almost no restrictions on identifiers, lowers th=
e chance of name clashes.

Taking it then from the Scheme side: is there advantage in detecting name c=
lashes, aside from it being part of the Scheme standard?

Regards,

Jurgen