> On May 4, 2017, at 8:40 PM, Dupéron Georges <jahvascriptman...@gmail.com> 
> wrote:
> Le vendredi 5 mai 2017 02:30:50 UTC+2, Ben Greenman a écrit :
>> With a `define/contract-out` macro?
>> But I'd rather not have a macro like this in the contract library.
>> I prefer reading code with all the "provide" statements at the top of the 
>> file.
> Since provide transformers are executed in two passes (the second one being 
> after the expansion of the rest of the file, IIRC), I thought about writing 
> define/contract-out so that it saves the contract, but does not implicitly 
> provide the identifier.


[[ In a world where the IDE teases out all possible provides and can show a 
beautifully formatted interface for a module, we might not want to follow 
linguistics. ]] 

> On this topic, I have sometimes written recursive functions with expensive 
> contracts (when recursing down a list, a contract on the whole list will have 
> a total cost of O(n²)).

1. It’s “recurring” not “recursing”. The latter means curse and curse and curse 
and curse . . . 

2. I consider this a horrible idea and I made sure define/contract does not do 
so. If you feel that unsure about recursive functions, I recommend using types. 
They help you avoid typos at that level. 

— Matthias

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to