> I highly suggest reading "Practices of an Agile Developer" > http://www.pragprog.com/titles/pad/practices-of-an-agile-developer > > Use KISS. Stay DRY. Code less. Code smart (code S-Mart). > > Use smart shortcuts when they're available to you. Implicit boolean > coercion is one such shortcut, among many others. > > We need to get things done. We don't have the luxury that academia has to > argue about theory for months and years.
You've spent as much time arguing about this as people typically spend typing out Boolean expressions in the first place. Honestly, if you're finding an extra ten or so characters a burden, you may have other problems that are unrelated to the value of using implicit Boolean evaluation. This has nothing to do with "getting things done" or "arguing about theory". But anyway, arguably, keeping it simple doesn't mean keeping it brief. An explicit Boolean expression is simpler to read and understand than an implicit Boolean evaluation. Not all languages support implicit Boolean evaluation, so I have to remember one set of rules for some environments and a different set for others - not simple. Again, I'm not saying there's anything wrong with implicit Boolean evaluation, I just think it's a mistake to believe it's inherently superior to an explicit, slightly longer Boolean expression, to the point of telling people they should replace one with another. And as much as I like Ash, I'm not sure I want to take coding advice from the guy who couldn't remember "klaatu barada nikto" - maybe he was too enamored of shortcuts? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders