guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

macro like "my" in Perl


From: Paul Jarc
Subject: macro like "my" in Perl
Date: Tue, 25 Jun 2002 18:19:24 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu)

I'm looking for something like Perl's "my": something that adds a
binding to the current environment (like internal defines), gives an
error for multiple uses of the same symbol in a single scope (like
internal defines and let), and lets previously-defined variables be
used in values for later bindings (like let*).  I expect I'll have to
wrap the whole scope with a special macro, but I'd like to avoid
having each definition wrap everything that comes after it.  Is there
anything like this already out there?
(new-scope
  (my-define foo #t)
  (do-random-stuff-with foo)
  (my-define bar foo)
  (do-other-stuff-with bar))


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]