RE: [PHP-DEV] RFC: Small changes in CODING_STANDARD

From: Date: Mon, 18 Mar 2002 17:35:44 +0000
Subject: RE: [PHP-DEV] RFC: Small changes in CODING_STANDARD
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-81443@lists.php.net to get a copy of this message
Except is should be side-effect, not side of effect. :) -Chris -----Original Message----- From: Yasuo Ohgaki [mailto:yasuo_ohgaki@yahoo.com] Sent: Monday, March 18, 2002 1:23 AM To: Zeev Suraski Cc: php-dev@lists.php.net Subject: Re: [PHP-DEV] RFC: Small changes in CODING_STANDARD Zeev Suraski wrote: > At 09:50 18/03/2002, Yasuo Ohgaki wrote: > >> Markus Fischer wrote: >> >>> I wouldn't uset the word Heisenbugs. Not every developer is >>> familiar with it. Do you think it's possible to use a more >>> descriptive sentence? >> >> >> >> Oh. I agree. >> How about >> >> - Do not use assignment in assert condition. If assignment is used, >> there is risk that we have disapearing bug with debug build due to >> side of effect of assignment. Function calls in assert condition >> may create this bug also when parameter or global variable is >> changed. > > > Do not use assignments in assert conditions. If you assign inside an > assert condition, you risk an elusive bug that would be very difficult > to spot in a debug build, due to the side of effect of the assignment. > Function calls in assert conditions may also cause this problem, if they > modify one of their arguments or global variables. > > Thanks a lot. Much easier to understand for me too :) -- Yasuo Ohgaki -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.dev (#81443) next »