> I'd say that's a slightly kludgy hack that I only mention > because the 'right' solution was proposed and overruled. > You're implicitly coercing the numeric result returned by > 'len' into a boolean value, which works, because of the > typeless nature of CF. By using a numeric comparison that > returns boolean, you avoid implicit coercion, which makes the > code easier to read. It's a subtle difference, but it's > worth that extra keystroke, IMHO.
Well, it may be a little less clear and verbose as an explicit comparison, it's hardly a hack, or kludgy. It's clearly allowed by the language, and competent CF programmers will easily understand it. Some languages allow implicit casting of integers as Booleans, others don't. Would you also categorize short-circuit evaluation as a kludgy hack because you can't do it in some languages? I agree that an explicit comparison is slightly easier to understand, and therefore is at least as good as an implicit comparison, but the difference is marginal at best. But at this point, we might as well be arguing about how many angels can dance on the head of a pin. 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! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204724 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

