Re: Joe-E

"Steven R. Brandt" <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On 04/29/2010 11:42 AM, David Wagner wrote:
> Steven R. Brandt wrote:
>    
>> After a little thought, I believe I have an acceptable solution for the
>> problem. In case it is of use, here's what I did to implement a
>> powerless list class:
>>
>> public class PowerlessList<T>  {
>>      
> Did you mean to add "implements Powerless"?
>
> Why not use org.joe_e.array.PowerlessArray?  If you want an ordered
>    
No, the point was that I wanted the ability to use String, and
String (while powerless) does not implement Powerless and
the code won't compile.
> sequence of Powerless items, it seems to be exactly what you want:
> PowerlessArray is a Powerless, ordered sequence of Powerless items.  As a
> bonus, it provides more efficient random access to elements than your
> PowerlessList, and the PowerlessArray has a number of utility methods.
>    
But I can't add to it in a convenient way. A powerless linked list is 
very useful, it
is arguably the of the main data structure of Haskell (and with Joe-E
you are sort of turning Java into a functional language).
> And, most importantly, PowerlessArray cleanly handles the issue you
> mentioned (it can hold classes explicitly declared Powerless; it can
> also handle legacy classes that are honorarily Powerless, like String).
>
>    
>> The key is the holder class. It is able to hold a String, Integer, etc.
>> Essentially, it turns the check from a compile-time to a run-time check,
>> and allows me to use either String or Powerless. Of course, the whole
>> thing might die with a bad type error, so it's a trade-off.
>>      
> I noticed your implementation hardcodes String, Number, Boolean, and
> Character, so it may miss other classes that are honorarily powerless.
>
>    
Sure, and these would have to be added by hand.
> Should we add an ImmutableHolder and a PowerlessHolder to the Joe-E
> library, written along the lines of the ImmutableArray and PowerlessArray
> implementation?  If so, do you want to propose some code?
>
>    
That would be nice! My Holder class was in the email.
>> The basic problem, I think, is that Powerless is a marker interface. If
>> it were an attribute instead, then I think things would be nicer.
>>      
> Hmm.  I haven't thought about this, but I'm guessing one challenge
> is that this would require re-implementing Java's type checks, so it
> might take more work.
>
>    
It would definitely be tricky to get working, but I think it would
be worthwhile.
>> Maybe you could consider this for a future version?
>>      
> Unfortunately we have no current plans, and no resources, to make major
> changes to Joe-E.  We're not actively developing Joe-E at this point;
> it's a research project, and we've currently moved on to other projects.
>    
Understood. We intend to use Joe-E to implement a website for
managing accounts and allocations on supercomputers. We like
the security properties and hope to get a conference paper or
two out of the project.

Maybe if that gains some recognition, it might lead to more development
for Joe-E. Who knows?

I like the framework and would like to see more done with it.

Cheers,
Steve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.