chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] Ports checking


From: Christian Kellermann
Subject: [Chicken-hackers] Ports checking
Date: Sun, 25 Sep 2011 20:35:39 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

I've noticed that at least in extras.scm almost none of the procedures
check whether they get the *right* port, i.e. whether read routines
get input-port and write procedures get output-ports.

The obvious thing would be to add type checks to each but maybe
that could also be done by the scrutinizer? Is it (by design)
possible to extend it that way to add some tags to a port identifier?

At the moment there is no extra type tag for ports is there?

The more I think about it the more I like the idea to let this work
be done by the scrutinizer.

If the check fails most of the procedures will fail with a 
'Error: call of non-procedure: #f' as they do now.

What do you think?

Christian

-- 
Who can (make) the muddy water (clear)? Let it be still, and it will
gradually become clear. Who can secure the condition of rest? Let
movement go on, and the condition of rest will gradually arise.
 -- Lao Tse. 



reply via email to

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