[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] the effect of set! on the top-level namespace
From: |
Shawn Rutledge |
Subject: |
Re: [Chicken-users] the effect of set! on the top-level namespace |
Date: |
Mon, 15 Oct 2007 11:25:41 -0700 |
On 10/15/07, Tobia Conforto <address@hidden> wrote:
> Yes, set! is the preferred operator for changing the value of an
> existing variable. I believe using define with an existing variable
> name is not good practice.
Does anybody know of an existing pattern for treating a variable like
a stack? So you could "push" a new definition and then "pop" it later
to get the old one back again? (Obviously I could write something
like that... just wondered if there is a really clever mechanism
already.) Let-binding has this effect (if you re-define a top-level
variable inside a let statement) but I mean at the top level.