This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: learning scheme : difference in letrec behavior




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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]