chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: tcp-read-timeout: procedure or parameter?


From: William Xu
Subject: [Chicken-users] Re: tcp-read-timeout: procedure or parameter?
Date: Wed, 25 Jun 2008 01:40:50 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin)

Peter Bex <address@hidden> writes:

> Chicken has an implementation of SRFI-39: Parameter Objects of which
> you can find docs at http://srfi.schemers.org/srfi-39/srfi-39.html

I read the srfi-39 carefully.  It appears that it can be more or less
expressed by simple lexical scoping.  For instance,

,----[ parameter ]
| (define tcp-read-timeout (make-parameter 60000))
| 
| (parameter ((tcp-read-timeout #f)) 
|            body)
`----

,----[ let ]
| (define tcp-read-timeout 60000)
| 
| (let ((tcp-read-timeout #f))
|    body)
`----

So what's the extra benifits of using `parameter'? 


ps.  As we can see, the indention for `parameter' syntax is indented
like a general procedure, which is not as beautiful as `let'(in emacs).
Same for other syntaxes such as when, unless, etc.  Is there a way to
make them indent nicer? Or I should just live with that? 

-- 
William

http://williamxu.net9.org

The door is the key.





reply via email to

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