Open cesarl opened 9 years ago
I don't think that a return is a complicated thing and It allows to chain your operation.
I ask for a vote !!! Hahaha !!! (Honnêtement c'est juste parce que je trouve ça moche et que je cherchais des tâches de clean pour Lolo, mais si vous avez de meilleurs idées n'hésitez pas ! )
Le jeu. 2 juil. 2015 20:04, DorianPinaud notifications@github.com a écrit :
I don't think that a return is a complicate thing and It allows to chain your operation.
— Reply to this email directly or view it on GitHub https://github.com/Another-Game-Engine/AGE/issues/499#issuecomment-118197623 .
J'aurai tendance à dire que ce n'est pas moche. Quand une fonction initialement void peut se montrer utile en retournant une information supplémentaire (que l'utilisateur n'est pas obligé de récupérer) ça me semble plutôt bien. Et pour le compte un return *this; ne nuit pas à la lisibilité du code. Du coup pour ce cas là je rejoins plutôt Dorian.
@DorianPinaud add a lot of of useless return this. That's beautiful but totaly useless and complicate the code for nothing.
For example
replace it by normal code
You will find a lot of code like that in graphical parts