Re: (name '{abc}) no good in Ersatz

2015-04-13 Thread Alexander Burger
Hi Jon,

> There is probably a simple answer to this (that I should know by now):
> Why do I get this when using ersatz . . ?
> 
> : (name '{abc})
> !? (name '\{abc \})
> \{abc -- Can't rename

Yes, this is a bit funny. In fact, this is a kind of double error.

First, ErsatzLisp doesn't have external symbols. Still, the characters
'{' and '}' are handled as meta-characters by the reader (e.g. to be
compatible with normal PicoLisp). So this has the effect that {abc} is
read by the reader as *two* symbols:

   {abc

and

   }

As a result, 'name' receives a second argument (as can also be seen from
the error message above) and believes it has to rename '{abc' to NIL,
which is the value of '}'.

Second, because ErsatzLisp doesn't know about external symbols, '{abc'
is created as an *internal* symbols. And internal symbols are not
allowed to be renamed (only transients).

So we get the above error.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


(name '{abc}) no good in Ersatz

2015-04-13 Thread Jon Kleiser
Hi,

There is probably a simple answer to this (that I should know by now):
Why do I get this when using ersatz . . ?

: (name '{abc})
!? (name '\{abc \})
\{abc -- Can't rename

/Jon
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe