On 23 Apr, 2006, at 11:26 am, Alberto Valverde wrote: Also I should note that you don't *need* to undersand how they work in order to *use* them. @generic() def flip_the_frobble(obj): pass ... def clever_function(obj): flip_the_frobble(obj) What does clever_function actually do? It's impossible to tell, because you have no idea what versions of the generic flip_the_frobble have been created. When languages like C++ offer function overloading, they do it via type inspection. So you can very clearly understand whether the function will be invoked. However, generic functions have no such limitations. I've heard lots of arguments touting that generic functions increase the flexibility of code, and that's certainly true. However, no one has every cited an example that can only be achieved using generic functions. I've yet to hear an explanation similar to: "I've been looking for a way to flip my frobbles for ages, and thanks to generic functions, I now can!" No. I'm afraid I classify generic functions under "leads to bad software design". -- Jeff Watkins "We're growing the government at a pace that makes Democrats look thrifty." -- Senator Lindsey Graham, (R) South Carolina --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~--- |
- [TurboGears] Re: Is Identity too much? I think so. Jorge Godoy
- [TurboGears] Re: Is Identity too much? I think so. Steve Bergman
- [TurboGears] Re: Is Identity too much? I think s... Jorge Godoy
- [TurboGears] Re: Is Identity too much? I thi... Steve Bergman
- [TurboGears] Re: Is Identity too much? I... Jorge Godoy
- [TurboGears] Re: Is Identity too mu... jvanasco
- [TurboGears] Re: Is Identity too mu... Jorge Godoy
- [TurboGears] Re: Is Identity too mu... jvanasco
- [TurboGears] Re: Is Identity too mu... Jeff Watkins
- [TurboGears] Re: Is Identity too mu... Alberto Valverde
- [TurboGears] Re: Is Identity too mu... Jeff Watkins
- [TurboGears] Re: Is Identity too mu... Alberto Valverde
- [TurboGears] Re: Is Identity too mu... Alberto Valverde
- [TurboGears] Re: Is Identity too mu... Jorge Godoy
- [TurboGears] Re: Is Identity too mu... Alberto Valverde
- [TurboGears] Re: Is Identity too mu... Jorge Godoy
- [TurboGears] Re: Is Identity too mu... Alberto Valverde
- [TurboGears] Re: Is Identity too mu... Bob Ippolito
- [TurboGears] Re: Is Identity too mu... BJörn Lindqvist
- [TurboGears] Re: Is Identity too mu... Alberto Valverde
- [TurboGears] Re: Is Identity too mu... Jorge Godoy

