[MERGE] remove spurious call in revision store add_revision.
John Arbash Meinel
john at arbash-meinel.com
Thu Aug 30 18:16:39 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> On Wed, 2007-08-22 at 13:29 -0400, John Arbash Meinel wrote:
>> John Arbash Meinel has voted tweak.
>
>> ... but we should also avoid calling
>> methods on the return value of functions rather than using a variable)
>
> Why? This is the first I've heard of this, and I think its a pretty
> nasty smell to use a temporary variable where none is needed.
>
> -Rob
>
Because it is a whole lot easier to read than:
self.foo(a_parameter).bar(some, more, parameters).some_other_method()
Actually, more important is that all of these are rather long method names,
which requires wrapping. Which makes it even harder to tell where one thing
starts and one thing ends.
I wouldn't say it is a must. But *I* find it much more obvious. Especially
since the temporary variable will have a name to help you understand what kind
of object it is.
I think the smell of long changes of functions is a lot worse than a temporary
variable. But maybe that is just me.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG1vt3JdeBCYSNAAMRAsjhAKCrdIe+RChmJjc2JkZfQQeUEF83RwCgmYQr
2SmIxlRLMpWfeZU/LBrd4V0=
=dPlc
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list