Re: [Hampshire] Code style

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Code style

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x5689c100.hantslug.org.uk.29242': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Mon Jun 8 16:58:00 2009 BST
gpg: using DSA key 20ACB3BE515C238D
gpg: Can't check signature: No public key
On Mon, Jun 08, 2009 at 03:50:47PM +0000, Isaac Close wrote:
> --- On Mon, 8/6/09, Hugo Mills <hugo@???> wrote:
> > > On Mon, Jun 08, 2009 at 02:53:12PM +0100, Daniel Pope wrote:
> > >
> > > result = 1 if test() else -1
> > >
> > > the idea being that the difference in syntax stresses
> > the success path
> > > as the default with the failure path as a fallback.
> >
> >    Eww. That's *intensely* ugly.
>
> I disagree. The above makes sense to me and fits on one line, whats
> so *intensely* ugly about it ?


It messes with the expected syntax of the "if" and "else" keywords,
in addition to being a ternary operator (and hence being inherently
obfuscatory and hard to read).

Hugo.

PS. I see my .sig quote generator is having an appropriate moment...

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
     --- "I don't like the look of it,  I tell you." "Well, stop ---     
                          looking at it, then."