[Grace-core] Annotations

Kim Bruce kim at cs.pomona.edu
Mon Jun 10 16:43:07 PDT 2013


Quick question:

What is the semantics of the annotation "readable" on defs and vars?

We have talked about having levels of privacy called public, confidential, and private (though I'm not sure if we decided to keep private -- it is currently not supported in minigrace).

Methods are by default public, while defs and vars are by default confidential (private?), unless, as minigrace allows, you annotate the entire file with a different default.

If the default for defs and vars is actually confidential, then it seems to me that readable means the corresponding accessor method should be public.

On the other hand, if the default for defs and vars is private then it makes sense to have readable mean the corresponding method is confidential, while "public readable" would be required to make it public.

I raise the question now as minigrace seems to use the first interpretation (readable means public readable), while James' code for nano-grace seems to assume the second.  We should nail this down one way or the other.  If we use the latter then we need to worry about what "is public, readable, writable" means and whether it differs from "is public, readable, public, writable".

Kim





More information about the Grace-core mailing list