I think this has been possible in PHP since forever and that community treats it as bad practise. Let's not repeat PHP's mistake 20 years later...
This has been possible in functional and "expression" languages since forever, and it's considered a very good practice.