You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Thilo Goetz <tw...@gmx.de> on 2007/01/08 10:59:10 UTC

CAS/JCas/CommonCas

I see two reasonable alternatives.  Neither involves a CommonCas.

a) The JCas assumes its wrapper nature.  It implements its additional 
functionality, and for all base functions, users refer to the CAS.

b) The JCas extends the CAS.  For conflicting methods, use a different 
method name.

I like a) better because it reflects the nature of the JCas.

The CommonCas proposal shows the problematic nature of forwarding 
functions.  Those common methods started out as forwarding functions, 
and in the implementation, I guess they still are.  Then we notice that 
there are a lot of common APIs between the JCas and the CAS.  Of course 
there are, all those forwarding functions.

--Thilo



Re: CAS/JCas/CommonCas

Posted by Marshall Schor <ms...@schor.com>.
Thilo Goetz wrote:
>
>
> Marshall Schor wrote:
>> Thilo Goetz wrote:
>>> I think there is sufficient resistance to the CommonCas, and we 
>>> should undo the change.  Marshall?
>>
>> I don't think it would be good to undo this.  It seems valuable to me 
>> to factor out common things, make more explicit what's
>> intended to be the same, and what's intended to be different, and 
>> factoring shrinks the code base,
>> making future maintenance easier.  Of course, if we adopt the 
>> get-rid-of-JCas as a separate interface
>> suggestion, then this goes away.  I'm fine with picking a better name 
>> for it, also.
>>
>> -Marshall
>
> It seems we not only have different technical opinions, but we're not 
> agreed on process, either.  You're the only one in favor of this 
> change, with me strongly opposed, Adam not in favor, and the rest 
> silent.  We've both given our technical reasons, we're not going to 
> reach consensus. In my understanding, this means that the change is 
> not approved and doesn't go in.  What is your opinion on how to handle 
> such a case?

My understanding of the Apache Way process is that one committer is all 
it takes to veto a change.  Although I don't think I've seen a -1 vote 
on this, it looks like there's little support for keeping this in - so 
I'll undo this one.

-Marshall


Re: CAS/JCas/CommonCas

Posted by Thilo Goetz <tw...@gmx.de>.

Marshall Schor wrote:
> Thilo Goetz wrote:
>> I think there is sufficient resistance to the CommonCas, and we should 
>> undo the change.  Marshall?
> 
> I don't think it would be good to undo this.  It seems valuable to me to 
> factor out common things, make more explicit what's
> intended to be the same, and what's intended to be different, and 
> factoring shrinks the code base,
> making future maintenance easier.  Of course, if we adopt the 
> get-rid-of-JCas as a separate interface
> suggestion, then this goes away.  I'm fine with picking a better name 
> for it, also.
> 
> -Marshall

It seems we not only have different technical opinions, but we're not 
agreed on process, either.  You're the only one in favor of this change, 
with me strongly opposed, Adam not in favor, and the rest silent.  We've 
both given our technical reasons, we're not going to reach consensus. 
In my understanding, this means that the change is not approved and 
doesn't go in.  What is your opinion on how to handle such a case?

--Thilo

Re: CAS/JCas/CommonCas

Posted by Marshall Schor <ms...@schor.com>.
Thilo Goetz wrote:
> Adam Lally wrote:
>> On 1/8/07, Thilo Goetz <tw...@gmx.de> wrote:
>>> I see two reasonable alternatives.  Neither involves a CommonCas.
>>>
>>> a) The JCas assumes its wrapper nature.  It implements its additional
>>> functionality, and for all base functions, users refer to the CAS.
>>>
>>> b) The JCas extends the CAS.  For conflicting methods, use a different
>>> method name.
>>>
>>> I like a) better because it reflects the nature of the JCas.
>>>
>>
>> The JCas currently *is* a wrapper.  I don't see that being a wrapper
>> implies not having forwarding functions.
>>
>> As Marshall notes (b) can't work because we want to change return
>> types.  Now, we could have come up with different method names, but I
>> think it may be too late to consider doing that now.
>>
>> Basically, I don't think there was any problem with the way JCas was
>> before CommonCas was introduced.  Why is it a problem if there are
>> methods with the same signature in both places?
> [...]
>
> I think there is sufficient resistance to the CommonCas, and we should 
> undo the change.  Marshall?

I don't think it would be good to undo this.  It seems valuable to me to 
factor out common things, make more explicit what's
intended to be the same, and what's intended to be different, and 
factoring shrinks the code base,
making future maintenance easier.  Of course, if we adopt the 
get-rid-of-JCas as a separate interface
suggestion, then this goes away.  I'm fine with picking a better name 
for it, also.

-Marshall

Re: CAS/JCas/CommonCas

Posted by Thilo Goetz <tw...@gmx.de>.
Adam Lally wrote:
> On 1/8/07, Thilo Goetz <tw...@gmx.de> wrote:
>> I see two reasonable alternatives.  Neither involves a CommonCas.
>>
>> a) The JCas assumes its wrapper nature.  It implements its additional
>> functionality, and for all base functions, users refer to the CAS.
>>
>> b) The JCas extends the CAS.  For conflicting methods, use a different
>> method name.
>>
>> I like a) better because it reflects the nature of the JCas.
>>
> 
> The JCas currently *is* a wrapper.  I don't see that being a wrapper
> implies not having forwarding functions.
> 
> As Marshall notes (b) can't work because we want to change return
> types.  Now, we could have come up with different method names, but I
> think it may be too late to consider doing that now.
> 
> Basically, I don't think there was any problem with the way JCas was
> before CommonCas was introduced.  Why is it a problem if there are
> methods with the same signature in both places?
[...]

I think there is sufficient resistance to the CommonCas, and we should 
undo the change.  Marshall?

Re: CAS/JCas/CommonCas

Posted by Adam Lally <al...@alum.rpi.edu>.
On 1/8/07, Thilo Goetz <tw...@gmx.de> wrote:
> I see two reasonable alternatives.  Neither involves a CommonCas.
>
> a) The JCas assumes its wrapper nature.  It implements its additional
> functionality, and for all base functions, users refer to the CAS.
>
> b) The JCas extends the CAS.  For conflicting methods, use a different
> method name.
>
> I like a) better because it reflects the nature of the JCas.
>

The JCas currently *is* a wrapper.  I don't see that being a wrapper
implies not having forwarding functions.

As Marshall notes (b) can't work because we want to change return
types.  Now, we could have come up with different method names, but I
think it may be too late to consider doing that now.

Basically, I don't think there was any problem with the way JCas was
before CommonCas was introduced.  Why is it a problem if there are
methods with the same signature in both places?

I agree with Thilo's earlier criticism of CommonCas that this is a
visible change to the user, who may have to look in multiple places in
the JavaDoc to find what they are looking for.  But doesn't that same
thing apply if these methods are removed from JCas entirely so that
the user has to use the CAS API - in fact that's worse since it's not
as obvious that they should look for methods there as it is that they
should look on the superinterface.

I don't think the code maintenance gain produced by CommonCas is that
significant - there's no code in the interfaces anyway - the only
thing we save maintenance on is the JavaDoc.  And I'm not even sure if
there might be cases where you'd want the JavaDoc to be different.


> The CommonCas proposal shows the problematic nature of forwarding
> functions.  Those common methods started out as forwarding functions,
> and in the implementation, I guess they still are.  Then we notice that
> there are a lot of common APIs between the JCas and the CAS.  Of course
> there are, all those forwarding functions.

Again, I don't see why this is so "problematic".

-Adam