GitHub user Ji-Xinyou added a comment to the discussion: The map construction 
in opendal's C binding

> Maybe we don't need to have both `builder` and `config`. Only keep `builder` 
> like what we do for `services` LGTM.

So you mean like
```C
opendal_builder_fs builder = opendal_builder_fs_new()
   .root(char* root)
   .atomic_write_dir(char* root);
```

This seems not possible in C since it is not Object Oriented, no `self` is 
provided nor encapsulation.
If you are curious about this, you could take 
[this](https://stackoverflow.com/questions/32347910/oop-in-c-implicitly-pass-self-as-parameter)
 to have a look.

Apart from the `opendal_builder_fs_config` way, the following is possible.
```C
opendal_builder_fs opendal_builder_fs_new();
void opendal_builder_fs_root(opendal_builder_fs *builder);
void opendal_builder_fs_atomic_write_dir(opendal_builder_fs *builder);
```

I think both are acceptable, but the first one is more light weight.

GitHub link: 
https://github.com/apache/incubator-opendal/discussions/1904#discussioncomment-5577680

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to