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

Re: [FWP] Goal oriented programming



On Mon, Jun 28, 1999 at 06:13:41PM -0500, Edward M. Perry wrote:
> I still contend it is more natural to analyze a sequence of
> instructions in order. To do so otherwise is prone to error
> and material for comedy writers.

What do you mean by 'analyze'?  If you want to analyze the conditional
first, that's fine; it's certainly how Perl executes the code.  That is not
how the code ahs to be written, however.


It is often natural to phrase instructions in a 'do this if this' order.


> Shake well before opening.
> 
> or 
> 
> Open, if you have already shaken well.
> 

Refrigerate after opening.

or

Open, and then refrigerate.


As a linguist, Larry specifically designed Perl to imitate natural
languages.  Use C<if (foo()) { bar() }> where that is more natural, and
C<bar() if foo()> where that is more natural.
In particular, the former emphasizes the conditional, and the latter
emphasizes the block.


Ronald

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