2 ms·
>Unless they substantially overlap in their code, in which case it's not better. Depends. DRY is not an absolute rule. Sometimes the added abstraction to make
by coldtea 9y ago
>Unless they substantially overlap in their code, in which case it's not better.
Depends. DRY is not an absolute rule. Sometimes the added abstraction to make something DRY makes it messier.
>"isDOMNodeNotPresent" is not a _conditional_.
Well, the if is assumed, no? What the author suggests is to avoid having what you check being negative -- so not only "if (!$isNotFoo)" but also "if ($isNotFoo)" is bad as well "if (!isFoo)" is clearer imo.
>But for every dev who thinks that exception-based error handling is a good idea there will be two who don't.
Some people don't like checked exceptions, but I don't think many have beef with exception based error handling.