[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python or Perl for a Debian maintainance project?



On Fri, Feb 20, 2004 at 08:58:22AM +0100, Matthias Urlichs wrote:
> Then there's the
> aded complexity of passing arguments and of checking for errors more than
> once.

Don't do that, then.

> The basic idea, after all, is to write exactly one function which
> expresses the concept of "do X; check for and recover from errors while
> doing so"

That's a bad idea, because...

> so that the next person can easily understand the thing.

...that doesn't follow.

Every function should be small enough to understand in once
piece. That means splitting it if necessary. Division between
preparation/error handling and useful work is usually a good choice to
start with.

> Linus' opinion, which I happen to mostly share, is that all that extra
> stuff you're adding just because you don't like GOTOs is added complexity
> with basically no advantages.

I think you're on drugs. For any function that wasn't so trivial it
could be understood in one pass, it's invariably clearer the way I
described.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature


Reply to: