This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: learning scheme : difference in letrec behavior
- From: Per Bothner <per at bothner dot com>
- To: Debabrata Pani <debabrata dot pani at gmail dot com>, kawa at sourceware dot org
- Date: Mon, 2 Nov 2015 18:52:42 -0800
- Subject: Re: learning scheme : difference in letrec behavior
- Authentication-results: sourceware.org; auth=none
- References: <CAKJw4feinTa1_VA+6r8zVy0uMhWNYe1BNjEzGcUhvrYjXuGTtg at mail dot gmail dot com>
On 11/02/2015 06:42 PM, Debabrata Pani wrote:
In kawa (2.1 , 2.0) ,
the expression and its result
#|kawa:27|# (letrec ((x 1) (y (+ x 2))) (+ y x))
4
#|kawa:28|#
But the above expression fails in chicken/gambit
gsi error message
*** ERROR IN (console)@1.19 -- (Argument 1) NUMBER expected
(+ #!unbound 2)
from my point of view , this is harmless. And probably portability
with other scheme implementations is not my concern as well.
Kawa basically implements 'letrec' as if it were 'letrec*'.
I.e. it evaluates the init expressions in order, while R7RS
makes it unspecified. This is allowed as an implementation
dependency.
But will this have any other unwarranted impact ?
Only that you depend on Kawa-specific unportable semantics.
--
--Per Bothner
per@bothner.com http://per.bothner.com/