Skip navigation.
 
mlRe: assignment in if clause
FROM : Hamish Allan
DATE : Mon May 26 21:38:11 2008

On Mon, May 26, 2008 at 8:12 PM, Michael Gardner <<email_removed>> wrote:

> I disagree with the whole notion that using the result of an assignment
> is "bad style" or "confusing". I find it quite clear and natural to use
> constructs like "while (foo = [enumerator nextObject])", and I suggest
> to those who are uncomfortable with the similarity of the = and ==
> operators to use an editor that makes the difference clear, perhaps via
> syntax coloring. And adding extra parentheses just to assure the
> compiler that you know what you're doing is man serving machine, not the
> other way around as it should be.


Why tinker with syntax highlighting to make the difference a bit
clearer, when the compiler you're already using already makes the
difference crystal clear?

Presumably, using debugging tools is also a case of man serving
machine -- you should just write the code properly in the first place
;)

Hamish

Related mailsAuthorDate
mlalternate pattern for object initializers Stuart Malin May 26, 07:47
mlRe: alternate pattern for object initializers Kyle Sluder May 26, 08:51
mlRe: alternate pattern for object initializers Stuart Malin May 26, 09:25
mlRe: alternate pattern for object initializers Kevin Grant May 26, 09:28
mlRe: alternate pattern for object initializers Michael Gardner May 26, 09:59
mlRe: alternate pattern for object initializers Hamish Allan May 26, 11:01
mlRe: alternate pattern for object initializers Jens Alfke May 26, 19:13
mlassignment in if clause (was: alternate pattern for object initializers) Stuart Malin May 26, 20:06
mlRe: assignment in if clause (was: alternate pattern for object initializers) Hamish Allan May 26, 20:40
mlRe: assignment in if clause (was: alternate pattern for object initializers) Jonathan Prescott May 26, 20:49
mlRe: assignment in if clause Michael Gardner May 26, 21:12
mlRe: assignment in if clause Scott Ribe May 26, 21:35
mlRe: assignment in if clause Hamish Allan May 26, 21:38
mlRe: assignment in if clause Kevin Grant May 27, 05:37
mlRe: assignment in if clause Scott Ribe May 27, 15:46
mlRe: assignment in if clause Steve Christensen May 27, 16:52
mlRe: assignment in if clause Isak Styf May 27, 21:31