Jörn Kottmann wrote:
> Jörn Kottmann wrote:
>> Marshall Schor wrote:
>>> I'll probably stop trying to convince others if they continue to feel
>>> that the tradeoffs here should be in the direction of returning only
>>> specific types (disallowing users from specifying downcasting in that
>>> manner), versus using types of the form T extends X,
>>> which allows users to specify downcasting.
>>>   
>> The case of FSIndexRepository is maybe more clear
>> then the other cases in our API.
>>
>> With down casting it could be changed to
>>
>> interface FSIndexRepository {
>> <T extends FeatureStructure> FSIndex<T> getIndex(String label);
>> <T extends FeatureStructure> FSIterator<T> getAllIndexedFS(Type aType);
>> ...
>> }
>>
>> and then a user could write
>>
>> FSIndex<AnnotationFS> index = repo.getIndex(...);
>> FSIterator<AnnotationFS> it = repo.getAllIndexedFS(...);
> Any opinions on this ? Right now the class is not generified but I
> would like to change that before the release.
> 
> Jörn

Will our average user know what this means?  If you
think the answer to that is "yes", then I'm for it.
I personally believe the answer is probably "no".

--Thilo

Reply via email to