[racket-dev] consistency in names and signatures

From: Andy Gocke (agocke at gmail.com)
Date: Wed Mar 28 14:54:46 EDT 2012

On Wed, Mar 28, 2012 at 1:24 PM, Jay McCarthy <jay.mccarthy at gmail.com>wrote:

> I see a solution to the string->url to be that the function should
> just throw a contract violation exn internally without specifying the
> contract outside. You could document it as having some
> valid-url-string? that called string->url, but the actual contract
> applied to string->url would just be string?

I don't want to focus too much on string->url and I think this discussion
has moved past my level of knowledge, but I would like to describe my
thesis a little bit to give people a sense of where I'm coming from.

Right now the purpose of my thesis is to automatically load modules, grab
contracts, generate values associated with those contracts, and try to
break those functions with generated and stored values. This is based off
of Casey Klein's OOPSLA paper. If the contract for string->url contains a
regex in the domain one could easily see writing a random generator for
regular expressions and thus automatically testing a wide variety of
regex-filtered contracts.

If the contract is simply string? that doesn't mean I can't test
string->url, but it does mean that I can't do it automatically and would
need to create a specialized generator for all such cases. I'm not sure if
this affects the decision of what's best for Racket as a whole, but it may
be food for thought.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20120328/b4bb5582/attachment.html>

Posted on the dev mailing list.