Re: Joe-E
[email protected] (David Wagner)
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Organization | University of California, Berkeley |
| Message-ID | <[email protected]> |
Steven R. Brandt wrote: >It appears to me that ConstArray uses .safej files to do its magic. I >was looking for a way to create powerless containers that didn't involve >explicitly marking things as safe inside safej files. I want to do this >only for capabilities I'm specifically enabling (CreateUser, DeleteUser, >etc.). Joe-E uses .safej files to indicate which legacy library classes should be considered honorarily Immutable, Powerless, etc. This is a key part of Joe-E; it's not something specific to ConstArray. ConstArray uses org.joe_e.JoeE.isSubtypeOf(), which consults the policy database that's found in the .safej files. If you don't need a map class that's capable of holding arbitrary Powerless objects, but just a few types of objects that you control, then your strategy should work fine. > The JoeE.isSubTypeOf() mechanism is not adequate for what I'm doing, as > I have to cast it to a known powerless type to avoid having JoeE flag > an error. Hence, as near as I can see, it is necessary to enumerate > the types as I have done. If we are going to put PowerlessHolder in the Joe-E libraries, then it doesn't need to pass the Joe-E static verifier. If we're going to do that, I'd prefer that PowerlessHolder be implemented using JoeE.isSubTypeOf(), rather than hardcoding classes that are honorarily Powerless in its source code. The definitive source of information about honoraries is the taming database. It doesn't seem like great software engineering to duplicate that information in the source code of Joe-E libraries; I'm concerned about the risk that the two lists will get out of sync.