I recently used a library that allows the following type of syntax:
MyClass myObject;
myObject
.setMember1(\"string value\")
.setMember2(4.0f)
.s
It's called a fluent api. It's not bad practice, just a different style of programming.
The biggest drawbacks (IMO) would be that since you are returning a reference to yourself, you can't return anything else and it can be difficult to debug fluent statements since they are seen by the compiler as one giant "line" of code.