flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch33hau <...@git.apache.org>
Subject [GitHub] flink issue #4178: [FLINK-7000] Add custom configuration local environment i...
Date Sun, 25 Jun 2017 08:20:53 GMT
Github user ch33hau commented on the issue:

    https://github.com/apache/flink/pull/4178
  
    Hi @zentol , thanks for taking time for reviewing :)
    
    It was my original thought. 
    However turns out due to `Scala` supports `default value` in parameters, in order to achieve
same behaviour as Java, adding a new method is not working here.
    
     This is what currently Java has:
    
        1. createLocalEnvironment()
        2. createLocalEnvironment(Int)
        3. createLocalEnvironment(Int, Configuration)
    
    Before this PR, in Scala we have:
    
        createLocalEnvironment(Int = defaultValue)
    
    So a Scala user can access this method by `createLocalEnvironment()` or `createLocalEnvironment(someValue)`.
    
    If I add another method `createLocalEnvironment(Int = defaultValue, conf = defaultValue)`,
compiler will complain because at this moment `createLocalEnvironment(someValue)` is ambiguous.
    
    My opinion is by just adding a parameter with default value to existing method, it doesn't
change the existing way to access the method. 
    
    How do you think?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message