[GitHub] incubator-flink pull request: Shallow copy, deep equality, and has...

Posted by zentol on
URL: http://deprecated-apache-flink-mailing-list-archive.368.s1.nabble.com/GitHub-incubator-flink-pull-request-Shallow-copy-deep-equality-and-has-tp229p305.html

Github user uce commented on the pull request:

    https://github.com/apache/incubator-flink/pull/17#issuecomment-46251005
 
    PS: I think a `deepCopy` won't be possible in general, no? If this is correct, we could just name the method `copy` instead of `shallowCopy` and add the according comments.
   
    I'm also fine with both approaches. I just tried to imagine what _I_ (highly subjective :P) would look for as a user. But this is what the different approaches would look like in practice, right?
   
    ```java
    Tuple4<Integer, String, Double, Integer> toCopy = ...
    Tuple4<Integer, String, Double, Integer> theCopy = new Tuple4<Integer, String, Double, Integer>(toCopy)
    ```
   
    vs.
   
    ```java
    Tuple4<Integer, String, Double, Integer> toCopy = ...
    Tuple4<Integer, String, Double, Integer> theCopy = toCopy.copy();
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---