Re: [Prevayler-coders] Codehaus CVS converted to Subversion
Brought to you by:
jsampson,
klauswuestefeld
From: Justin T. S. <ju...@kr...> - 2008-04-04 20:20:06
|
On Fri, Apr 4, 2008 at 9:48 AM, Klaus Wuestefeld <kla...@gm...> wrote: > When looking at that sugested API, even being a generics user myself, > I was overwhelmed by generics, exceptions and annotations. The generics were definitely overwhelming, which is why I was disheartened by the whole affair. My initial fantasy was that they'd be simple and clear, with Prevayler parameterized with the prevalent system type, Query parameterized by the prevalent system and query result types, etc. But pretty quickly, using it in a real system (and even in the existing demos) required so many question marks and angle brackets all over the place it became unwieldy. Maybe there's still a simpler approach that would be useful to people. Klaus, when you refer to yourself as "a generics user", do you just mean things like List<Foo> and Map<Foo, Bar>, or have you developed other libraries with generics that didn't turn out a mess? The annotations were *totally* experimental -- I tried several approaches, and was never happy with any of them. The idea was that everything is a "transaction" -- an atomic operation -- whether it's read-only (a "query"), read-write, etc., so there could be a single Transaction interface, with annotations expressing ways that this particular transaction might be optimized. For example, a read-only transaction doesn't need to be journaled; an immutable transaction doesn't need to be deep-copied. If you deep-copy and journal every transaction, the logical behavior of the system is still correct, so *not* doing these things can be seen as "merely" optimizations. I still stand by that reasoning, but annotations weren't successful in expressing it! Cheers, Justin |