chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] Clean versus pure in types.db


From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] Clean versus pure in types.db
Date: 12 Mar 2012 18:02:48 +0100

On Mar 12 2012, John Cowan wrote:

Felix scripsit:

I used "pure" only half-heartedly. Strictly speaking a "pure" function should not even throw an error, the "pure" meaning: this procedure will not have any effect whatsoever, regardless of arguments (so it can be removed if the result is unused). "(length 42)" will signal an error, so it is not pure.

Frankly, if it were treated as pure I doubt if any Real World programs would be affected.

While I'd bet what is located at the lower end of my spine on that.  ;-)

I've never had much sympathy for the CL and R6RS viewpoint that programmers should be able to count on a run-time exception being raised when they've done something silly.

Just because silly programs exist.  I've contributed to that pile
myself.

While I agree that programs SHOULD not depend on such r/t exceptions
eventually they do.

But your are right, John: it would be an interesting option to have
a compiler switch, which would treat all "clean" declarations as
if they where declared "pure" (e.g., as if things where one level
stricter than known to work so far).

/Jörg






reply via email to

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