help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: What does "lacks a prefix" mean?


From: Barry Margolin
Subject: Re: What does "lacks a prefix" mean?
Date: Fri, 10 Jul 2015 10:42:19 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <mailman.6643.1436488423.904.help-gnu-emacs@gnu.org>,
 Drew Adams <drew.adams@oracle.com> wrote:

> > > And non-parallelizable theoretically :)
> > 
> > Regular let isn't parallelizable. It specifies that the value
> > expressions are evaluated in order.
> > 
> > The only difference between the two is the environment within which
> > later expressions are evaluated.
> 
> FWIW, Common Lisp specifies that "let performs the bindings
> in parallel and let* does them sequentially."

It specifies that the bindings are done in parallel, but evaluation of 
the initialization forms is sequential. From

http://www.lispworks.com/documentation/HyperSpec/Body/s_let_l.htm#let

"LET ... first evaluates the expressions init-form-1, init-form-2, and 
so on, in that order, saving the resulting values. Then all of the 
variables varj are bound to the corresponding values"

whereas 

"LET* ... first evaluates the expression init-form-1, then binds the 
variable var1 to that value; then it evaluates init-form-2 and binds 
var2, and so on"

If the forms have no side effects, LET can indeed execute them in 
parallel, since there's no way to tell the difference. LET* can also do 
that for any initialization expressions that don't refer back to earlier 
variables and have no side effects.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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