Again, this isn't really idiomatic to Rust. Your current hello()/hello_with_msg() is what is preferred, as it more clearly indicates your intent. I've personally had method overloading bite me in the butt a few times before, in Java.
I was exploring terminal setting in linux , so basically I was looking for some kind abstract getter and setter with same name and I guess overloading is one way to achieve it.
I guess there must be a good reason for it , so be it
I think I can manage without overloading and still use method syntax with same name, but need to use extra structure.
Here set_lflag() produces some type which implement setter for local flags via method calls.
And now to get terminal local flag terminal setting I would now use
let enabled = term.get_lflag().icanon();
Here again get_lflag() produces some type which implement getter for local flags via method calls with same name as in setter .
This increases the code bloat and maybe sucks a little but can be generated via macros. I am not sure if this is the correct design , but surely makes terminal interface looks elegant for use in client application.
That particular design would also be rather limiting; the macro has no access to the subject of the call. For comparison, here's a draft pre-RFC I wrote on the subject. So I'd say there's interest in it from some quarters, but whether it happens or not (shrugs).