Re: Announcing a new release of Lisp1 #2
- From: Bob Woodham <woodham@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 19:58:00 +0000 (UTC)
On 2008-01-30, Rainer Joswig <joswig@xxxxxxx> wrote:
In article <Pine.LNX.4.58.0801301727290.20788@xxxxxxxxxxxxxx>,
"Kjetil S. Matheussen" <k.s.matheussen@xxxxxxxxxx> wrote:
(removed comp.lang.scheme, only relevant to comp.lang.lisp)
On Wed, 30 Jan 2008, Blake McBride wrote:
I would further add that Scheme should define argument evaluation order.
Compilers can be written to support a particular order just as well as
another order. This is no argument for unspecified argument evaluations
order. Having the argument evaluation order unspecified is a huge and
totally unnecessary opportunity for porting bugs.
Scheme is not haskell, so I agree about that.
BTW, does common lisp specify the order of arguments?
Yes: evaluation of arguments is left to right in Common Lisp.
There was a previous discussion of the issue of argument evaluation order in
this newsgroup, March, 2005. In that discussion, two arguments in support of
unspecified argument evaluation order were identified:
1. Potential for optimization given a compiler that could/would re-arrange the
order of argument evaluation (at compile time);
2. (Run-time) support for parallelism (i.e., evaluation of n arguments could
be spun off as n processes without concern for the order in which they
might complete).
Marcin 'Qrczak' Kowalczyk <qrczak@xxxxxxxxxx> pointed out that although the
order is unspecified in Scheme the result is required to be consistent with
some sequential ordering.
In Scheme (R5RS) we read:
4.1.3. Procedure calls
[...]
Note: Although the order of evaluation is otherwise unspecified, the effect of
any concurrent evaluation of the operator and operand expressions is
constrained to be consistent with some sequential order of evaluation. The
order of evaluation may be chosen differently for each procedure call.
Alas, the requirement for consistency with some sequential ordering defeats
straightforward support for parallelism.
Aside: C/C++ is like Scheme, the order of argument evaluation is unspecified.
Given the emergence of multi-core processors, I think there's an argument for
an even more relaxed take on the issue of order of argument evaluation. Given
that the order of evaluation is unspecified, what is the rationale for
requiring the ordering to be consistent with some sequential ordering?
.
- References:
- Re: Announcing a new release of Lisp1 #2
- From: Kjetil S. Matheussen
- Re: Announcing a new release of Lisp1 #2
- From: Rainer Joswig
- Re: Announcing a new release of Lisp1 #2
- Prev by Date: Re: Seeking help for learning system for absolute beginners
- Next by Date: Re: Paul Graham's Arc is released today... what is the long term impact?
- Previous by thread: Re: Announcing a new release of Lisp1 #2
- Next by thread: LISP by Winston+Horn
- Index(es):
Relevant Pages
|
|