[wp-trac] [WordPress Trac] #14598: Minor coding standard flaws?

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 12 14:58:28 UTC 2010


#14598: Minor coding standard flaws?
-----------------------------+----------------------------------------------
 Reporter:  wojtek.szkutnik  |       Owner:                 
     Type:  defect (bug)     |      Status:  new            
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:                 
 Severity:  normal           |    Keywords:  dev-feedback   
-----------------------------+----------------------------------------------

Comment(by filosofo):

 Replying to [ticket:14598 wojtek.szkutnik]:
 > While browsing the WP code I found a lot of minor coding standard flaws,
 like wrong-side comparisons ( "if x !== false instead" of "if false !== x"
 etc).

 The point of doing those "Yoda conditions" is to be part of a practice
 that catches mistakes ''at the point of code construction''.  After the
 code is written, their value is gone.  So I wouldn't spend time addressing
 them aside from when they're code changed for other reasons, as sribu
 suggests.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14598#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list