[Mono-list] [Off-topic] "if else" or "switch" ?

Stefan Matthias Aust sma@3plus4.de
Fri, 15 Oct 2004 16:48:31 +0200


Fabien Meghazi schrieb:

Method 3 :)

  left = or == 'l';
  top = or == 't';

Both other methods disguise that you don't check the case that or isn't 
one of tlbr and that it could happen that you set neither left nor top.

In general, I'd vote for the better communicating variant and/or the 
shorter one because that's most often easier to read.

-- 
Stefan Matthias Aust