lanking520 commented on issue #12835: [MXNET-984] Java NDArray Documentation 
Generation
URL: https://github.com/apache/incubator-mxnet/pull/12835#issuecomment-431183844
 
 
   > This is very similar code to the other APIDocGenerator class one level up. 
It looks like all that really changes are package names and stuff. Is there 
anything that prevents us from writing a base class and two subclasses instead 
of having a lot of nearly identical code?
   
   @andrewfayres It is very similar, but I cannot find a better way to reuse 
the code since there is all 1-2 line diff with the original one in each of the 
function. So there are two choices in front of me:
   - extend the existing generator
   - create a new generator.
   
   Make the existing document generator more complicated and code piece into 
small fragments which would be severely hard to understand and maintain 
(consider adding a isJava boolean field everywhere in the function).
   
   Since the purpose and the points are to generate API only serve to Java, I 
think it's reasonable to break this generator separate to the original one and 
keep the structure simple and readable.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to