Hi Jon, no, "real" objects don't behave like this, they behave just
like you would expect them to. In my opinion it's a bad idea to rely
on these ad hoc containers because the server assigns request data to
global symbols like this.

That means that if you for example post "hello" to a PL server and use
"greeting" as the key you can access "hello" anywhere in your code by
way of (get 'greeting 'http) so you can imagine the headaches that can
arise if you start using 'greeting in your code and overwrite the data
you have posted.

It's similar to PHP's register globals but not as bad:
http://php.net/manual/en/security.globals.php (still ugly though).

I don't know why Alex chose to do like this and not have some single
global symbol that could be queried instead like for instance (get
'http-request 'greeting) or something.

On Mon, Aug 30, 2010 at 5:31 PM, Jon Kleiser <jon.klei...@usit.uio.no> wrot=
> Hi,
> I got a little surprised when I discovered that property manipulations on=
> "local" symbol, e.g. inside a 'let' block, had "global" effects, like in
> this example:
> : (prog (setq S 1) (put 'S 'p 2) (let S 3 (put 'S 'p 4)) (show 'S))
> S 1
> =A0 p 4
> -> S
> I understand this is probably the way it's supposed to be, but I wasn't
> prepared. I have very little knowledge about other Lisps, so I don't know
> whether properties is a common concept in other Lisps, or how properties =
> used. I only know PicoLisp uses properties in OO matters. Can this global
> nature of properties ever represent a problem when working with Classes a=
> Objects in PicoLisp?
> /Jon
> --
> UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to