tadayosi commented on pull request #2443:
URL: https://github.com/apache/camel-k/pull/2443#issuecomment-870277069


   Thanks for the references.
   
   > More concretely, it is not possible to define a method outside the 
struct's package, so in the specific conditions.go example, it would not be 
possible to define methods for Deployment.
   
   Yes, sorry for not having made it clearer. This is what I meant. I think 
it's OK not to put those structs and methods together in the same files, we can 
keep those logics in `conditions.go`.  My question is whether we should make 
them a method or function in `conditions.go`.
   
   I personally like method because it makes it clear where the logic should 
belong. But the OO-neutral grammars of Go makes me confused on seeing which one 
is really benefitial. Not only this one but also there are many places where 
functions can be changed to methods in camel-k codebase. At the same time, 
though, I'm not sure if blindly converting fuctions to methods is a good thing. 
That's why I wanted to hear other's thoughts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to