[plt-scheme] Contract Error Message

From: YC (yinso.chen at gmail.com)
Date: Mon Jul 20 15:10:27 EDT 2009

On Mon, Jul 20, 2009 at 11:59 AM, David Van Horn <dvanhorn at ccs.neu.edu>wrote:

> Carl Eastlund wrote:
>> Not according to the documentation I find here:
>> http://docs.plt-scheme.org/reference/contracts.html
>> Constants are perfectly acceptable contracts.  If the contract?
>> function doesn't accept them, then either contract? needs to start
>> accepting them or or/c needs to be documented with a more general
>> contract.  But values like #f, 'foo, or 5 are usable with most
>> contract primitives.
> Ah, yes, (contract? #f) => #t, which I forgot.
> However, or/c accepts any number of predicates and *higher-order*
> contracts, so perhaps the or/c contract can be refined to enforce this
> aspect of the specification?

I am a happy user of the current contract system and would hate to see this
change.  Constants are a perfectly valid contract and why should they not be
accepted in a higher order contract?  This would seriously curtail the
expressiveness of the contract system, not to mention create two separate
rules to remember.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090720/35cafbcf/attachment.html>

Posted on the users mailing list.