From: "Drew Adams" <drew.adams@oracle.com>
To: "'Nix'" <nix@esperi.org.uk>
Cc: 11328@debbugs.gnu.org
Subject: bug#11328: 24.1.50; Comment in `dired-copy-file-recursive' code
Date: Wed, 25 Apr 2012 09:26:18 -0700 [thread overview]
Message-ID: <AC2D6D6891604AA7B2B01EC684015CC3@us.oracle.com> (raw)
In-Reply-To: <87y5pk53ra.fsf@spindle.srvr.nix>
> Fluid variables are a Scheme thing (more, generally, a
> functional-programming thing). "Dynamically-scoped free
> variable" would be a reasonable thing to replace it with.
Bof!
Googling just a bit suggests that a fluid variable is more or less a dynamically
scoped variable. That does not at all make it a _free_ variable. The variable
occurrences noted in this code were free - no matter how scoped. Free in lambda
calculi, free if dynamically scoped, free if lexically scoped. Free variables.
And that is presumably why the comments were inserted: to point out to readers
that the occurrences are not bound locally.
> finding out what a fluid is once you see that is a matter of
> ten seconds looking in, say, the Guile manual.
No, it is not a matter of ten seconds. And the term "fluid variable" does not
even appear in the Guile manual.
The closest the manual comes, AFAICT, is this: "Fluids can also be used to
simulate the desirable effects of dynamically scoped variables." NB: "also" and
"simulate" and only certain "effects of".
IOW, the Guile manual does not even say that a fluid is a dynamically scoped
variable, let alone a d-s _free_ variable. A fluid is said to be an object that
can store one value per dynamic state. The claim wrt dynamic scoping is only
that, among its various uses, a fluid can simulate some of the effects of a
dynamically scoped variable.
(The Guile manual, BTW, distinguishes fluid vars from "parameters", which it
says are "like dynamically bound variables in other Lisp dialects". The
distinction being apparently that parameters are per-thread.)
Anyway, this is not Guile - or Scheme of any sort.
In the same vein, here is a quote from Emacs Wiki, presumably written by a
Schemite. It indicates a similar parochialism:
"Scheme was the first language to introduce lexical binding. ...
Variables subject to dynamic binding are usually referred to as
`fluid variables' or `parameters' on these systems."
(http://www.emacswiki.org/emacs/DynamicBindingVsLexicalBinding#Scheme)
In the Beginning there was The Scheme... First to introduce lexical binding,
indeed!
But even if dynamically bound variables are "usually" referred to as "fluid
variables" among Scheme enthusiasts, that is no reason to suppose that Computer
Science or programming practice in general refers to them that way. And anyway,
the code comments I commented on are about _free_ variable occurrences. They do
not simply point out variables that are dynamically scoped.
FWIW, the `librep' manual says that "fluid variables" aka fluids are another
"method of implementing dynamically scoped variables." The sole purpose of such
an object, it claims, is "to provide a location from which dynamic bindings may
be created."
(And yet librep's claim to fame is that it has improved on Emacs Lisp in this
way: It "was originally inspired by Emacs Lisp. However one of the main
deficiencies of elisp--the reliance on dynamic scope--has been removed."
Removed ... and then implemented, it seems, using fluids.)
FWIW, here's a Joulist characterization of fluid variables, which claims that
Scheme has _no_ fluid variables:
"A fluid variable is a symbol and cell that is established as part
of the current environment. When a fluid variable (symbol) is
referenced the current nest of environments is searched for a
fluid variable with the matching symbol. The first such match
provides the cell that satisfies the reference. This really means
that each continuation embodies a set of fluid bindings. Many uses
of continuations, for which they were reified, are incompatible
with fluid variables. One such use is time-slicing.
Scheme has no fluid variables."
http://www.cap-lore.com/Languages/Global.html
The same article mentions global vars, static class vars, "fluid variables in
Common Lisp", and dynamically scoped vars as being "related". I personally have
not seen "fluid variable" used wrt Common Lisp, which AFAIK calls it a "special
variable".
In short, I do not see where, even in the limited world of Scheme or Guile, a
free variable occurrence is a "fluid variable" or vice versa. No, I am no
expert on SkemeSpeke. But I can usually recognize a free variable when I see
one.
Mea culpa: I googled for "fluid variable" before filing the bug, and it seemed
that the term was essentially limited to fluid mechanics. So I guessed
(wrongly) that its use here might have been a mistranslation from some other
natural language to English. I did not guess that it was simply the _use_ of
another language, unnatural, and not a translation at all.
So let me translate my bug report: time to translate to English. These are
_free_ variable occurrences.
next prev parent reply other threads:[~2012-04-25 16:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 17:37 bug#11328: 24.1.50; Comment in `dired-copy-file-recursive' code Drew Adams
2012-04-24 17:49 ` Drew Adams
2012-04-24 18:22 ` Drew Adams
2012-04-25 13:40 ` Nix
2012-04-25 16:26 ` Drew Adams [this message]
2012-04-25 18:42 ` Thierry Volpiatto
2012-04-25 21:51 ` Drew Adams
2012-04-26 5:48 ` Thierry Volpiatto
2012-04-26 14:09 ` Drew Adams
2012-04-26 15:35 ` Drew Adams
2012-04-26 18:38 ` Thierry Volpiatto
2012-04-24 18:54 ` Stefan Monnier
2014-02-09 4:32 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AC2D6D6891604AA7B2B01EC684015CC3@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=11328@debbugs.gnu.org \
--cc=nix@esperi.org.uk \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.