-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jun 12, 2008, at 11:21 AM, skip at pobox.com wrote: > >>> Should it be... >>> >>> 2.n : .is_alive() >>> 2.n+1 : .is_alive() (deprecated), .alive (recommended) >>> 2.n+2 : .alive > > Barry> Personally, I'd go with a property .is_alive > > I'm not fond of using a property for this since it can lull you into > the > false belief that what you are doing is less expensive than it > really is > (attribute access vs method call). I think this is a case where > explicit is > better than implicit. I've heard this argument before, and it's one I'm not unsympathetic to. Usually I've heard it in the context of remote network access, e.g. let's say .alive had to make a REST call over the net each time. Well, maybe there's caching involved which amortizes the costs, so the argument gets trickier. Ideally, I would like for those considerations to not enter into the API design. I'd rather keep it clean, with sufficient documentation to give hints about any additional costs involved. Logically .alive is a property, so I'd like to write it that way. Perhaps function annotations help out here. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iQCVAwUBSFFDanEjvBPtnXfVAQJxbAQAq2BDNE7m+J+5Jy3E4XlHaw8JXsEaukEA YvZ1M1R1mREGCstIf4tlScKko1eu9PfJIk7+kCmFYezighJ1tPZunyu5zLemlgQe 9rJ9keFIJBLtao8yv+FPkn56idixtkTGq+14Ef+EhjIhOnbonp+eDuhScbE2tdzM 5tuFO/hsrqw= =66R7 -----END PGP SIGNATURE-----
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4