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

Re: [FWP] Goal oriented programming



1999-06-30-17:29:35 Edward M. Perry:
> I must be totally unique because when I write or analyze a program,
> I pretend to be the computer and attempt to mentally process it in the
> same order that the computer would.

Interesting. You may not be unique, but I'd hazard a guess you're unusual:-).

I --- and other folks I know who are really comfortable molesting computers
--- fall back on pretending-to-be-the-compiler as a last resort when faced
with nasty problems; most of the time we try and avoid nasty problems, and a
great help in doing so is programming idioms which "read well" ---
transliterate into natural-language constructs that document what I'm trying
to do. In that spirit I really find

	unlink $file unless $opt_n;

to express the intent better than

	if ($opt_n == 0) {
		unlink $file;
	}

just as a for instance.

As always, there are no clear-cut rules; style is something that grows on you
(unless you wash meticulously).

-Bennett

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org