[plt-scheme] Default (define-struct ...) behavior

From: Matt Jadud (jadudm at gmail.com)
Date: Thu Sep 20 17:16:53 EDT 2007

OK. I'll buy that.

It came up mostly because some of my students are experimenting with
full Scheme, and they're accustomed to the constructor syntax. With an
inspector, you get a distinct printed representation that still lets
them see what the contents of the structure they created/are testing
in the interactions window. If, of course, one says
"(make-inspector)", which is a rather opaque.

Cheers,
M

On 9/20/07, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Thu, 20 Sep 2007 13:13:46 -0400, "Matt Jadud" wrote:
> > I have a question about the default behavior of (define-struct ...):
> >
> > Why isn't (make-inspector) implicit in the definition of all structures?
>
> The default reflects the opinion that programmers should keep datatypes
> as abstract/encapsulated as possible by default.
>
> Matthew
>
>


Posted on the users mailing list.