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

Re: [FWP] Goal oriented programming



>From: Roland Giersig <roland.giersig@alcatel.at>
>Date: Tue, Jun 29, 1999, 6:03 AM
>

>
> The option of putting the conditional *behind* the action
> allows to make the code more understandable.
>
> The purpose of putting the conditional *behind* the action
> is to direct the reader's attention to the action. So if
> I say:
>
>   die unless $ok;


print "Valid" unless (
    (0  < 0 || 0 > 0) ? 1
  : (0  < 0)          ? 1
  : (0 >= 1)          ? 1
  : 0
)


This concept really goes against the perl grain in
that 0 = false, >0 = true.

Especially when the writer is not sure whether
0 is true or not.  A beginner can themselves
into a corner where they are no longer sure
what the goal was...

-Sneex-  :]
FCCJ Data Security Group
______________________________________________________________________
Bill Jones  Data Security Specialist  http://www.fccj.org/cgi/mail?dss

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