PROPOSAL: Return 'this'

Marek Kozieł develop4lasu at gmail.com
Thu Mar 26 14:20:12 PDT 2009


2009/3/26 Reinier Zwitserloot <reinier at zwitserloot.com>:
> That argument makes no sense. If you're concerned about lines, try:
>
> with (object) { method1(); method2(); method3(); }
>
>
> If your coding style guide says that you must neccessarily newline after
> braces and semicolons, then you should question why that rule exists, and
> why it would not exist for the builder pattern.
>
> Incidentally, I like a return this proposal more, because I think it's lower
> impact (no new keyword, we're already familiar with methods that return
> themselves, a complete proposal would just enshrine this practice into
> canon), and looks better. Just saying that 'number of lines' is not a valid
> argument against.
>
>  --Reinier Zwitserloot
>
>


You total right, I just doubt if most peoples will use it in line, but
I wasn't clear enough.
-- 
Pozdrowionka. / Regards.
Lasu aka Marek Kozieł

http://lasu2string.blogspot.com/



More information about the coin-dev mailing list