POV-Ray : Newsgroups : povray.off-topic : Smart little programming tricks, where to find ? : Re: Smart little programming tricks, where to find ? Server Time
10 Oct 2024 17:20:03 EDT (-0400)
  Re: Smart little programming tricks, where to find ?  
From: Warp
Date: 18 Mar 2008 06:03:58
Message: <47dfa19e@news.povray.org>
Fa3ien <fab### [at] yourshoesskynetbe> wrote:
>   0 == myvalue

> instead of

>   myvalue == 0

  I have always disliked that "trick" because it breaks the logical way
to "read" the line. Nobody says "if zero is equal to this value". The
common expression is "if this value is equal to zero".

  I have seen some people go further and extend that "trick" to things
like:

    0 < money

  This always confuses me. Again, nobody says "if zero is smaller than
the amount of money". That sentence would be quite confusing. Naturally
everyone says "if the amount of money is larger than zero".

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.