[racket] Considering backward-incompatible change to Plot

From: Spencer Florence (spencer at florence.io)
Date: Tue Mar 17 13:51:28 EDT 2015

I've been using plot heavily for https://github.com/florence/convex-hulls,
which pulls a bitmap% from the snip% to render it as a gif. As long at the
Plot object can get me a bitmap% or its underlying vector, I would love the
new interface.

or maybe I should just be using `plot-pict`...

On Tue, Mar 17, 2015 at 12:35 PM Neil Toronto <neil.toronto at gmail.com>
wrote:

> Plot has been converted to Typed Racket in the upcoming Racket 6.2.
>
> I'm strongly considering taking this opportunity to improve the API. The
> change is backward-incompatible, however, so I need input from those of
> you who use Plot a lot.
>
> In particular, recent experience with Pict3D makes it clear that the
> type of the `plot` function shouldn't be this:
>
>    (-> (Treeof (U nonrenderer renderer2d)) ... (U Void (Instance Snip%)))
>
> but should be this instead:
>
>    (-> (Treeof (U nonrenderer renderer2d)) ... Plot)
>
> where a `Plot` instance is a value that can be queried for its
> properties (such as the legend, plot bounds, ticks, etc.) and just
> happens to print in DrRacket as an interactive snip. The type of
> `plot3d` would be changed to return `Plot3D` instances.
>
> Casual uses wouldn't see any change at all.
>
> However, functions that receive or return plots, *which also put
> contracts on plots*, would have to change to use `plot?` instead of
> (is-a?/c snip%), or use (require plot/snip), a new compatibility module,
> instead of (require plot).
>
> How many programs of yours would this change break?
>
> Any objections? Any suggestions?
>
> Neil ⊥
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20150317/2faca580/attachment-0001.html>

Posted on the users mailing list.