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

Re: [FWP] Goal oriented programming



It doesn't really matter how it is written, as long as :
a) it is valid code that the interpreter/runtime engine understands
b) the interpreter executes the code in the desired order.

If it is easier for you to read
if (x) {y}
well, write it that way.

If it is easier for you to read
{y} unless (!x)
well, go with that.

If many people need to maintain it, come up with standards/conventions.

As long as perl knows what to do with the code you write and it gives the
desired results...

trowt
----- Original Message -----
From: Edward M. Perry <eperry@learjet.com>
To: John Porter <jdporter@min.net>
Cc: <fwp@technofile.org>
Sent: Wednesday, June 30, 1999 11:33 AM
Subject: Re: [FWP] Goal oriented programming


>
> Ed Perry wrote:
> >
> > I agree with premise (important stuff first) but not the conclusion
> > (action is more important than the condition).
> >
> > Regardless of what camel suggests the condition is more important:
>
> That's a mighty sweeping generalization you're making there.
> I don't think you can categorically say the condition is always more
> important.  Many times in my code I have lines like this:
>
> $activity_log->dump()  if $debug;
>
> or:
>
> $activity_log->dump()  if -t STDIN;
>
> The condition is NOT more important in cases like this.

My computer thinks so, it alway processes the condition first.
Intentionally writing instructions out of order seems to be of
no benefit, but Vicki says its ok to do it either way.

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


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