[racket-dev] [plt] Push #25419: master branch updated
10 minutes ago, Robby Findler wrote:
> Oh, right. Duh.
>
> And even better, IMO, if it were futures-visualizer/typed/* were a
> place you could put this information.
Yeah -- that would make distribution much easier, since it will be
another global convention, like `tests' and `scribblings'.
> But I'm not sure that the trust is there for that.
It seems that it should be fine, no? Looks like it's just the type
declaration that James is responsible to keep in sync with the untyped
code, so TR enforces the type that he declares and if it's broken it's
essentially the same as using a bad contract.
[wishlist mode]
And all of this points at a possible way for doing this: you write
code with type declarations for your provided bindings, and these
types can then be used to automatically make it so that your code is
available as-is (= unsafely, if you need the extra speed), with
automatically generated contracts, and as a TR-ed library. Maybe even
with some way to specify the default mode that most clients should
see -- contracted or not -- and always using the TR version if it's
used from TR code. Oh, and obviously generate documentation from that
too...
(And this is the point where Matthias would say that types are too
limited, so of course there should be some way to specify general
contracts too...)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!