Sorry, I'd be happy to have someone improve the title of this question.
What are the benefits and downsides of "positively formulated" logic vs. having it "english readable". I'm looking for a generic position that can be placed into code guidelines.
Examples of what I see as "positively formulated" logic
if ($obj->isValid()){
if ($found){
if ($first){
//do nothing
}else{
doX();
}
$this->useFields(array('a','b'));
Examples of what I see as "negatively formulated" logic
if (!$first)
doX();
}
$this->unset(array('d','e','f','g'));
Whereas if focusing on "English readable" I would see this as good:
if (isValid()){
if ($found){
and this is not "English readable"
if ($l){
if (isValid() || !isActive()){
doX();
}