cogcomp-nlp icon indicating copy to clipboard operation
cogcomp-nlp copied to clipboard

getview vs addview

Open danyaljj opened this issue 8 years ago • 2 comments

@mssammon In Annotator, getView and addView functions seem to be doing the same thing (one lazy and one not-lazy). Is that really the difference, or anything else I'm missing?

danyaljj avatar Oct 26 '17 04:10 danyaljj

you are correct. 'addView()' is intended to wrap the actual logic for the annotator behavior, while 'getView()' is the public interface. I wanted 'addView()' to be abstract in the base class.

mssammon avatar Oct 26 '17 12:10 mssammon

I think the naming is a little confusing. I wonder if we can merge them together as one name? I don't think it is clear what is the difference between these two functions without looking inside the code.

danyaljj avatar Oct 26 '17 13:10 danyaljj