[plt-scheme] picture language predicates?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Sep 7 10:53:11 EDT 2009

On Sep 7, 2009, at 6:26 AM, Carl Eastlund wrote:

> It is somewhat unfortunate that the image constructors mislead the
> user by saying (circle ...) and (rectangle ...) and so forth, instead
> of (render-circle ...) and (render-rectangle ...) which might be
> clearer.  Nevertheless, once you have an image, all you really have is
> a 2-dimensional vector of pixels.  The program can't tell if they were
> constructed by a circle constructor, a rectangle constructor, or by
> copy and paste from a web page.

While I agree with the principle of your answer, I disagree with
the detail of calling circle render-circle.

I also think we could have make-circle instead of circle, and
the library could still support operations on it (such as overlay
or rotate) and drscheme could render these pieces of data automatically
as pictures. -- An opaque (existential) data type (as is) isn't
a necessity. It makes sense only if you believe in OOP (as Wolfgang
should) or FP/ML or if you accommodate inserted images in addition
to plain shapes (as we do).

-- Matthias

Posted on the users mailing list.