On 11/24/2012 09:13 PM, Harry Spier wrote:
About a year ago, there was a discussion on the list about "provide"
propagating existing contracts.
(See: http://www.mail-archive.com/users@racket-lang.org/msg08623.html )
suggested by Neil Toronto for this reason:
"...define/contract has a huge advant
About a year ago, there was a discussion on the list about "provide"
propagating existing contracts.
(See: http://www.mail-archive.com/users@racket-lang.org/msg08623.html )
suggested by Neil Toronto for this reason:
"...define/contract has a huge advantage that contract-out doesn't have: it
puts a
On Sun, Oct 9, 2011 at 11:42 AM, Carl Eastlund wrote:
> On Sun, Oct 9, 2011 at 12:30 PM, Matthias Felleisen
> wrote:
>>
>> On Oct 8, 2011, at 9:49 PM, Ryan Culpepper wrote:
>>
>>> But in your alternative,
>>>
>>> (provide (contract-out [f contract-of-f]))
>>>
>>> the contract of f is *still* not
On Sun, Oct 9, 2011 at 12:30 PM, Matthias Felleisen
wrote:
>
> On Oct 8, 2011, at 9:49 PM, Ryan Culpepper wrote:
>
>> But in your alternative,
>>
>> (provide (contract-out [f contract-of-f]))
>>
>> the contract of f is *still* not manifest in the module. Instead of chasing
>> down f, we have to
On Oct 8, 2011, at 9:49 PM, Ryan Culpepper wrote:
> But in your alternative,
>
> (provide (contract-out [f contract-of-f]))
>
> the contract of f is *still* not manifest in the module. Instead of chasing
> down f, we have to chase down contract-of-f. We've also duplicated
> code/knowledge (t
On 10/08/2011 10:12 AM, Matthias Felleisen wrote:
[...]
(2) I object to
provide-with-whatever-contract-you-already-have
because I think programmers should explicitly state what
they want (if they want something logical).
We can already do this
(define primes-to-primes (-> (listof prime?
On Oct 8, 2011, at 12:48 PM, Neil Toronto wrote:
> On 10/08/2011 10:12 AM, Matthias Felleisen wrote:
>>
>> (1) I do not understand Neil's problem. Say I have module A and
>> want to protect its exports from abuses by clients, say module B,
>> why do you use define/contract at all? The define/con
On 10/08/2011 10:12 AM, Matthias Felleisen wrote:
(1) I do not understand Neil's problem. Say I have module A and
want to protect its exports from abuses by clients, say module B,
why do you use define/contract at all? The define/contract form
is for splitting modules into module-lets -- in case
(1) I do not understand Neil's problem. Say I have module A and
want to protect its exports from abuses by clients, say module B,
why do you use define/contract at all? The define/contract form
is for splitting modules into module-lets -- in case your module
is too large and you can't manage inv
It would be good if we had a provide form that meant "provide it with
the contract it already has" that you could use as a short-hand to
avoid duplicating the contract (really: avoid giving the contracts
names and managing those names since contracts are values).
We have talked about that before,
Using define/contract or a contract region, we can make a function with
a contract between the function and the module. If the function is
provided and a requiring module applies bad arguments, the module gets
blamed.
Or we can use (provide (contract-out ...)) instead, and make a contract
bet
11 matches
Mail list logo