unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.ping.de>
Cc: rm@fabula.de, guile-devel@gnu.org
Subject: Re: Bug in eval-string?
Date: 10 Aug 2002 16:18:20 +0200	[thread overview]
Message-ID: <873ctm7q6r.fsf@zagadka.ping.de> (raw)
In-Reply-To: <uw5r8h872k3.fsf@saturn.math.uni-magdeburg.de>

Matthias Koeppe <mkoeppe@mail.Math.Uni-Magdeburg.De> writes:

> > But "with" is such a nice name compared to "fluid-let"! ;) 
> 
> The name is *too nice* for something like FLUID-LET.  Remember, it
> uses DYNAMIC-WIND and lots of SET!s.  It is inefficient if CALL/CC
> is used.

Hmm, what is wrong with 'dynamic-wind' and 'set!'?

> It won't work in a threaded environment.

Really?  Whether or not the dynamic context established by "with" or
"fluid-let" is local to the current thread or gloabal to all depends
on the nature of the 'variable' that you are setting.  It could be a
fluid, or it could be an ordinray global variable.

> > I'd say that fluid-let should be in the core. Opinions?
> 
> I'd say, we should rather make SLIB integration smoother, and/or
> provide a SRFI-15 implementation (despite its withdrawn status).  
>
> Putting it in the core won't be a good idea IMHO.
> 
>  1)  It creates confusion because Guile knows real fluid variables.
>      FLUID-LET has "fluid" in its name but has no connection to
>      fluids.

That's actually one reason why I like "with".

>  2)  WITH-FLUIDS is much cleaner than FLUID-LET.  People should use
>      WITH-FLUIDS if they want (threadsafe) dynamic scoping.

But with-fluids is only for fluids, not for general dynamic scoping of
settable things.

> Moreover, for the application of switching modules by "dynamically
> binding" the place (CURRENT-MODULE), I think that using either your
> originally proposed "WITH" syntax or the FLUID-LET syntax are bad
> ideas because they suggest simple variable assignments, whereas
> changing the current module is a much heavier thing.

Yes, setting the current-module can have far reaching consequences,
but so could setting an ordinary variable.  In fact, setting the
current module is implemented by setting a variable (well, a fluid).
Since "with" or "fluid-let" is distinct from "let" there is no
immediate danger of someone accidentally setting the current module
with it (unlike in Common Lisp (when the *special* convention isn't
followed)).

So I don't see how offering "fluid-let" or "with" is dangerous.  It
might not be 'pure', but it offers something that people want to use.
having to use dynamic-wind explicitely is cumbersome and error prone
compared to fluid-let, in my view.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-08-10 14:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-08 12:56 Bug in eval-string? rm
2002-08-08 21:03 ` Marius Vollmer
2002-08-09  9:06   ` Matthias Koeppe
2002-08-09  9:19     ` Marius Vollmer
2002-08-09 10:24       ` Matthias Koeppe
2002-08-10 14:18         ` Marius Vollmer [this message]
2002-08-12 18:20           ` Matthias Koeppe
2002-08-13  0:39             ` Marius Vollmer
2002-08-14 19:07               ` Marius Vollmer
2002-08-17 11:09               ` Neil Jerram
2002-08-20 11:39               ` Matthias Koeppe
2002-08-21 19:26                 ` Marius Vollmer
2002-08-27 14:18                   ` Emacs variables (was: Bug in eval-string?) Matthias Koeppe
2002-08-31 13:51                     ` Marius Vollmer
2002-08-08 21:27 ` Bug in eval-string? Neil Jerram
2002-08-09  9:35   ` rm
2002-08-10 14:43     ` Marius Vollmer
2002-08-12 10:49       ` rm
2002-08-13 20:55       ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873ctm7q6r.fsf@zagadka.ping.de \
    --to=mvo@zagadka.ping.de \
    --cc=guile-devel@gnu.org \
    --cc=rm@fabula.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).