add 'open' function without parameters for create session with default config
Describe the feature
@kydos wrote "I think we should have an overloaded zenoh::open() that does not take the config. Having to create a config just to pass it seems an avoidable step."
This is possible in C/C++, but for Rust the name should be different. This could be Session::default() for example.
BTW: why it was decided to have just standalone open function, not the Session::open or Session::new ?
This could be implemented this way:
let s = zenoh::open().wait()?;
...
let c = Config::from_file(file)?;
let s = zenoh::open().config(c).wait()?;
I.e. make open function without parameters and add .config() setter to OpenBuilder
@Mallets what do you think?
The proposal looks good to me and makes the API more coherent.
On my side, I'm against, because I don't think we want the user to use default config. I don't know our user use cases at all, but is there some users that are really using default config in production?
About coherence, I don't think having configuration as a required parameter is an inconsistency. Other methods also have required parameter, like keyexpr for declare_subscriber. The question is again, do we want to encourage user to use the default configuration?
Maybe scout could be a better candidate for this kind signature change?
According to latest discussion, zenoh::open() will keep accepting Config as of Today.
@milyin I believe we can close the issue.
@Mallets Is scout a better candidate for a signature rework?