Re: CL vs scheme macros, namespaces.



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/
.



Relevant Pages

  • Re: System Sounds
    ... except the normal Windows sounds scheme doesn't work. ... control panel sounds section the play button is grayed out. ... Audio Devices--Change The Sound Scheme. ... The system sounds require a functioning *default* audio device. ...
    (microsoft.public.windowsxp.music)
  • Re: CL vs scheme macros, namespaces.
    ... >> I had problems with nameclashes in Scheme, ... In the following Scheme ... both CL and Scheme the first x *must* represent a function object. ... to defining the language is a matter of personal opinion. ...
    (comp.lang.lisp)
  • Re: System Sounds Dont Play
    ... How did you try manually setting them? ... I can also play mp3's with no problem and my tv tuner card ... Ultimate Extra Glass scheme, Ultimate Extras Pearl scheme and none of them ... No conflicts in device manager. ...
    (microsoft.public.windowsxp.general)
  • Re: Play The lottery For FREE!!!
    ... We only discuss the lottery in rec.gambling.lottery and have nothing ... > This really is your opportunity to be able to play the U.K lottery ... > This is a great scheme, as all you have to do is introduce Just Five ... > entries to win a grand every draw. ...
    (rec.gambling.lottery)
  • Re: Copy protected CDs
    ... >> scheme that involves damaging the CD in some way. ... > - allows Winblows audio players to play the tracks ...
    (Debian-User)