[plt-scheme] Re: Documentation inconsistencies? [was: Create new inspector hierarchies?]

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Apr 8 22:25:02 EDT 2007

At Sat, 07 Apr 2007 20:45:32 -0700, Derick Eddington wrote:
> 1) In my code below, `be-sneaky' does not get access to the
> super-struct-type, but if the current-inspector control check is skipped
> when making the list of values given to the `prop:sneaky' property
> guard-proc, shouldn't this list's value for the super-struct-type be
> `struct:s' because the current-inspector control check was skipped?

Right. I'll fix the docs.

> 2) Exploring #1 further, I made `hmm' and found that in the list of the
> values from struct-type-info, the init-field-k and auto-field-k values
> are not consistent with the documentation, which says these values are
> the number of fields "not counting fields created by its ancestor
> types", because the print-out shows these values are counting ancestor
> fields.

Yep. And the auto-k results are negative, which is clearly wrong.

The docs are right and the implementation is wrong in this case.
(Unfortunately, the implementation happened to produce the right answer
for my existing test case, although it arrived at the answer
incorrectly.) I've committed a bug fix in SVN.

Matthew



Posted on the users mailing list.