Marshall Schor commented on UIMA-1524:

A partial reply - more later...

(5) and (7) both have an aspect of words being "declarative" vs "imperative" 
sense.  Declarative is (to my mind) more in keeping with the lazy approach to 
functional paradigm embodied in streams, where nothing happens until you get to 
the "terminal" operation. The declarative says more what is to happen, without 
specifying how.  The imperative is more of a how statement.

The term "skip" sounds like an imperative action.  The term "offset" sounds (to 
me) more declarative.  I, however, completely agree that it's confusing due to 
its other use within UIMA.  So need to find another "declarative" term (if 
possible). Maybe fudgeFactor( + - nnn) ?  (offered in the spirit of 
brainstorming - might be silly, but might trigger a good thing :-) )

The term "reverse" is more like an action.  The declarative term might be 
iterate-toward-end-of-index, or iterate-toward-beginning-of-index.  Of course, 
these are too long... However, ignoring that, I think it would be intuitive 
that iterate-toward-end-of-index().iterate-toward-end-of-index() would not be a 

When you have semantics like reverse().reverse() being a no-op, yes, it makes 
sense in terms of imperative actions, but it requires the human reader of the 
code to "play computer" and keep some state variables, in order to figure out 
what the meaning of a bit of code is.  As my brain grows feebler (!), I find I 
prefer approaches which don't require this :-), but instead, always simply mean 
just what they say.

So, I'd like to find a declarative term expressing iteration direction - 
towardFirst, towardLast, or ??

> JFSIndexRepository should be enhanced with new generic methods
> --------------------------------------------------------------
>                 Key: UIMA-1524
>                 URL: https://issues.apache.org/jira/browse/UIMA-1524
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>    Affects Versions: 2.3
>            Reporter: Joern Kottmann
> Existing methods should be overloaded with an additional Class argument to 
> specify the exact return type. This changes make down casting of returned 
> objects unnecessary. 

This message was sent by Atlassian JIRA

Reply via email to