Your feedback and some more thinking about it has convinced me to not make the backward-incompatible change.

I'm still going to make Plot objects (though not in 6.2). They'll just be created by different functions.

Neil ⊥

On 03/18/2015 06:38 PM, Doug Williams wrote:
You know I use it a lot. Is there someway to check it out ahead of time?
My main concern is with my plots that are embedded in various GUI
elements. I sometimes did some weird things there,

On Tue, Mar 17, 2015 at 10:33 AM, Neil Toronto <neil.toro...@gmail.com
<mailto:neil.toro...@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
    <http://lists.racket-lang.org/users>



--
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