Re: Dotted pair call argument

2012-02-22 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: > >>> Scheme has a very useful property which your proposed syntax would >>> destroy: any valid expression can be substituted for any other valid >>> expression, and the result has the same meaning except for the >>> substitution. >> >> guile> (displ

Re: Dotted pair call argument

2012-02-21 Thread Mark H Weaver
David Kastrup writes: >> Scheme has a very useful property which your proposed syntax would >> destroy: any valid expression can be substituted for any other valid >> expression, and the result has the same meaning except for the >> substitution. > > guile> (display . (close (current-output-port)

Re: Dotted pair call argument

2012-02-21 Thread Neil Jerram
Mark H Weaver writes: > However, (f . (g x y)) is read as (f g x y), so it's impossible for > 'eval' to distinguish these two cases. Unfortunately, (f g x y) has a > very different meaning than (apply f (g x y)). The first means to apply > 'f' to three arguments. The second means to apply 'g'

Re: Dotted pair call argument

2012-02-21 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: >> >> A list in dotted tail position is evaluated via (map ... eval) rather >> than (eval ...). I don't see much of a problem with that. > > No, it's worse than that. I think you failed to understand my point, > so let me try again. You propose th

Re: Dotted pair call argument

2012-02-21 Thread Mark H Weaver
David Kastrup writes: > Mark H Weaver writes: > >> David Kastrup writes: >>> I guess my "real" problem is that I'd like to do call wrapping by writing >>> >>> (lambda ( . x) (fun . x)) >>> >>> instead of having to write >>> >>> (lambda ( . x) (apply fun x)) >>> >>> I assume eval is not supposed

Re: Dotted pair call argument

2012-02-21 Thread David Kastrup
David Kastrup writes: > Mark H Weaver writes: > >> David Kastrup writes: >>> I guess my "real" problem is that I'd like to do call wrapping by writing >>> >>> (lambda ( . x) (fun . x)) >>> >>> instead of having to write >>> >>> (lambda ( . x) (apply fun x)) >>> >>> I assume eval is not supposed

Re: Dotted pair call argument

2012-02-21 Thread David Kastrup
Mark H Weaver writes: > David Kastrup writes: >> I guess my "real" problem is that I'd like to do call wrapping by writing >> >> (lambda ( . x) (fun . x)) >> >> instead of having to write >> >> (lambda ( . x) (apply fun x)) >> >> I assume eval is not supposed to try dealing with dotted lists? >

Re: Dotted pair call argument

2012-02-21 Thread Mark H Weaver
David Kastrup writes: > I guess my "real" problem is that I'd like to do call wrapping by writing > > (lambda ( . x) (fun . x)) > > instead of having to write > > (lambda ( . x) (apply fun x)) > > I assume eval is not supposed to try dealing with dotted lists? The problem is that (f . (g x y)) is

Dotted pair call argument

2012-02-21 Thread David Kastrup
Hi, I am not sure whether this is a Scheme feature, but it seems inconvenient that ((lambda (a . b) b) 1 . 2) bombs out. The same with (apply (lambda (a . b) b) 1 2) I guess my "real" problem is that I'd like to do call wrapping by writing (lambda ( . x) (fun . x)) instead of having to writ