Express What, not How.
Vijay L
vijayl at lycos.com
Wed Oct 15 05:00:09 EDT 2003
gt5163b at prism.gatech.edu (Brian McNamara!) wrote in message news:<bmicpp$ifk$1 at news-int2.gatech.edu>...
>
> I am in total agreement with Marcin. What you (Raffael) say here
> sounds simply like dogma, rather than practical advice for constructing
> software.
>
> As a short practical example of what I'm saying, consider code like
[snip]
> If I understand you correctly,
It appears you don't.
[snip]
>
> In my opinion, the code here is worse than the original.
I agree.
[big snip]
You're taking things to a huge extreme to prove your point. Obviously
Raffael, being a programmer himself isn't suggesting that each and
every calculation/operation be put in a named function. The best
benchmark, is, I guess, the programmer himself. When programming, if
you find some portion of code that /you/ feel won't be understand when
you're rereading it or, you took a chunk out of a function to debug it
and at that point had to give it a name as another function etc etc;
/then/ keep that portion aside as a named function. It reduces the
burden on the person reading the original function that has been
shortened and, _gives him the choice_ to read this other function that
has been abstracted in that code.
Cheers,
Vijay
All future commitments are optimistic.
More information about the Python-list
mailing list