Re: [Discuss][Java] Refactor code for time related vectors

2019-08-28 Thread Fan Liya
Hi Jacques and Micah, Thanks a lot for your valuable feedback. The purpose of this change; 1. reduce the amount of code (by referencing implementations in the super class) 2. remove duplicated code by centralizing the code for get/set integers I agree that it violates the principle of accessing

Re: [Discuss][Java] Refactor code for time related vectors

2019-08-28 Thread Jacques Nadeau
On Wed, Aug 28, 2019, 7:42 PM Micah Kornfield wrote: > Hi Jacques, > > > > What problem are you trying to solve? It seems like you're proposing > > refactoring for refactoring's sake. > > I think Liya Fan is trying to eliminate duplicate code, which as long as it > doesn't violate design principl

Re: [Discuss][Java] Refactor code for time related vectors

2019-08-28 Thread Micah Kornfield
Hi Jacques, > What problem are you trying to solve? It seems like you're proposing > refactoring for refactoring's sake. I think Liya Fan is trying to eliminate duplicate code, which as long as it doesn't violate design principles seems like a good thing. >From the PR [1]: > One of the fundam

Re: [Discuss][Java] Refactor code for time related vectors

2019-08-28 Thread Jacques Nadeau
What problem are you trying to solve? It seems like you're proposing refactoring for refactoring's sake. On Mon, Aug 26, 2019, 7:13 PM Fan Liya wrote: > Hi Jacques, > > Thanks for the valuable feedback. > > I agree that it is a good idea to explicitly make field vectors final. > > However, I thi

Re: [Discuss][Java] Refactor code for time related vectors

2019-08-26 Thread Fan Liya
Hi Jacques, Thanks for the valuable feedback. I agree that it is a good idea to explicitly make field vectors final. However, I think there are still lots of duplicated code for getInt/getLong/setInt/setLong/setIntSafe/setLongSafe. In addition, we have a large number of time related vector class

Re: [Discuss][Java] Refactor code for time related vectors

2019-08-26 Thread Jacques Nadeau
I think you'd have to refractor differently since one of the patterns is get(index, object holder) is consistently matched. That means you should never subclass a field vector I believe. In fact we should probably just formally finalize them. Once you do that, I'm not sure how much duplicated code

[Discuss][Java] Refactor code for time related vectors

2019-08-26 Thread Fan Liya
Dear all, Currently, we have two classes of time related vectors. One class are named TimeXXVector, while the other class are named TimeStampXXVector. We found there are some redundant code for these classes, so we want to do some refactorings for them. 1. For TimeXXVector, all classes extend Bas