Re: Joe-E
"Rob Meijer" <capibara-qWit8jRvyhVmR6Xm/[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, April 29, 2010 09:52, David Wagner wrote: > I suspect the best solution is going to be to do the same thing we > did for ImmutableArray and PowerlessArray: write a trusted library in > Java, review it very carefully, and include it in the Joe-E library. > You'll have to spend some time poring over that code, as it's pretty > tricky code. (You'll notice that it uses reflection to dynamically > check that all elements are of the expected type, rather than using > the static type system; this is how a PowerlessArray can be used to > store both user classes that are declared Powerless as well as > library classes that are honorarily Powerless, like String.) > > Ideally, the goal is that Joe-E would provide a rich enough set of > libraries that you never have to run into this problem in application > code. In practice, Joe-E is a research project and does not have as > rich a set of libraries as we would like, so you may need to extend > our libraries. If you do, you might consider submitting your code for > inclusion in the Joe-E system. This is most likely a completely clueless question (given that I know verry little of Joe-E and have limited knowledge of Java generics, so I'l be commenting from a C++ generics point of view), but wouldn't it be more logical for any 'container' templates to be made honorarily transitively Powerless with respect to T ? That is, a smarter validation rather than a richer library ?