Re: CL vs scheme macros, namespaces.
- From: Marcin 'Qrczak' Kowalczyk <qrczak@xxxxxxxxxx>
- Date: Sat, 28 Jan 2006 16:36:18 +0100
Pascal Costanza <pc@xxxxxxxxx> writes:
> I had problems with nameclashes in Scheme, without using macros at
> all. There was no way to handle the nameclash at all, apart from
> renaming one of the variables manually.
>
> This:
>
> (let ((list '(1 2 3)))
> (list list))
I prefer to name different things used in the same scope by different
names.
For my language I adopted a naming convention where capitalization
distinguishes global and local names. This solves roughly the same
amount of clashes as distinguishing function names from generic value
names, and at the same time doesn't need extra syntax for using
functions as first-class values.
> Maybe, but that's not related to what I said. In the following Scheme
> code example, three x's play a different role than the remaining one:
>
> (x x x x)
>
> The first x determines what the code means, the others don't.
No, they play the same role. In all places they denote the same
function.
You could as well say that in (setf (aref x i) i) the i's play
different roles. Well, in some sense they do, but it doesn't mean
that they should be interpreted in different namespaces; the roles
use the same meaning of the identifier, and the same entity can be
used as either the index or the value. Similarly for functions and
values.
--
__("< Marcin Kowalczyk
\__/ qrczak@xxxxxxxxxx
^^ http://qrnik.knm.org.pl/~qrczak/
.
- Follow-Ups:
- Re: CL vs scheme macros, namespaces.
- From: patro
- Re: CL vs scheme macros, namespaces.
- From: Coby Beck
- Re: CL vs scheme macros, namespaces.
- References:
- CL vs scheme macros, namespaces.
- From: funkyj
- Re: CL vs scheme macros, namespaces.
- From: Kaz Kylheku
- Re: CL vs scheme macros, namespaces.
- From: Marcin 'Qrczak' Kowalczyk
- Re: CL vs scheme macros, namespaces.
- From: Pascal Costanza
- CL vs scheme macros, namespaces.
- Prev by Date: Re: adding new slots interactively
- Next by Date: setq vs setf?
- Previous by thread: Re: CL vs scheme macros, namespaces.
- Next by thread: Re: CL vs scheme macros, namespaces.
- Index(es):
Relevant Pages
|