Re: Why anonymity? [was Re: map/filter/reduce/lambda opinions and background unscientific mini-survey]
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: Why anonymity? [was Re: map/filter/reduce/lambda opinions and background unscientific mini-survey]

From: Duncan Booth <duncan.booth@invalid.invalid>
Date: Thu Jul 07 2005 - 17:46:23 CEST

Steven D'Aprano wrote:

> Put it this way: whenever I see a two-line def as above, I can't help
> feeling that it is a waste of a def. ("Somebody went to all the trouble
> to define a function for *that*?") Yet I would never think the same about
> a lambda -- lambdas just feel like they should be light-weight.

Obviously we think differently there. I don't see why lambdas are any
different than single expression functions. I certainly don't think of them
as lighter weight; they take just as long to call; and they involve just as
much stack setup/tear down. On the other hand I don't consider functions as
heavyweight, I'm happy to define short helper functions anywhere I think it
makes the code more expressive.

> Am I just weird?

No, just different[*]. There's nothing wrong with different.

[*] conclusion based entirely on your postings here. I have no evidence
beyond that.
Received on Thu Sep 29 16:48:58 2005