anti-if

is it possible to do this without using an "if" (asp.net mvc post action method)

according to anti-if campaign it is a best practice not to use ifs in our code. Can anyone tell me if it possible to get rid of the if in this piece of code ? [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(OrganisationInput organisationInput) { if (!this.ModelState.IsValid) { return View(organisationInput...

do this without using an "if" | if(s == "value1"){...} else if(s == "value2") { ...}

according to anti-if campaign it is a best practice not to use ifs in our code. Can anyone tell me if it possible to get rid of the if in this piece of code ? (switch is also not an option, The point is to remove the conditional logic, not replace ifs with similar language constructs) if(s == "foo") { Writeln("some logic here"); }...

Factory method anti-if implementation

Hello all, I'm applying the Factory design pattern in my C++ project, and below you can see how I am doing it. I try to improve my code by following the "anti-if" campaign, thus want to remove the if statements that I am having. Any idea how can I do it? typedef std::map<std::string, Chip*> ChipList; Chip* ChipFactory::createChip(cons...