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:21:08 EDT (-0400)
  Re: Smart little programming tricks, where to find ?  
From: Fa3ien
Date: 18 Mar 2008 13:06:05
Message: <47e0048d@news.povray.org>

>   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 mostly agree.  When I seen that trick, I also thought that it was not
very "natural", being the reverse of "this equals that".

However, there are many areas were programming require some kind
of backwards-thinking or even worse, so that's quite benign.

All in all, I don't recommend the trick or even think I'm gonna
use it myself, it was mostly an example of a small trick that
implies a little thinking, and I was wondering if there were any
other small programming tricks of that kind.

Fabien.


Post a reply to this message

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