[racket-dev] Please help me to understand the two lines.

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon May 30 12:20:31 EDT 2011

The docs are right; I wrote the last sentence backwards. Sorry.

On Monday, May 30, 2011, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> Sam, are you referring to this text?
>   The any/c contract is similar to any, in that it makes no demands on  a value. Unlike any, any/c indicates a single value, and it is
>
>   suitable for use as an argument contract.
> This would seem to suggest that any is actually more general, becauseany/c seems to require a single value whereas any (by implication)
>
> permits more or less than one.  This is compounded by the later text:
>   Use any/c as a result contract when it is particularly important to  promise a single result from a function. Use any when you want to
>
>   promise as little as possible (and incur as little checking as  possible) for a function's result.
> which again points to a single/any-number-of value(s) distinction.
>
>
> But then in his email Robby says
>   As for the any/c vs any: they are two separate things. "any/c" is  general purpose contract that allows anything. "any" is special
>
>   syntax that is only allowed inside function contracts. You can think  of "any" as a more restricted form of "any/c" and that's 95% of the  story.
>
>
> which I have difficulty reconciling with the docs quotes.
> Shriram
>



Posted on the dev mailing list.