> What about non-custom tags that have this ambiguity? CFHTTP, for > example. Or CFINVOKE. There are quite a few places that a XML > self-close clears up ambiguity.
Good question. I think I always provide end tags in those cases. Probably just habit. > And everywhere else, unless you use self-closes throughout, you still > have to read and interpret the tag name. I.e. <cf_tag /> obviously > has no closing tag, because of the slash. However, <cfset x = 5> > might, unless you actually read the "cfset" part, recall that CFSET > doesn't take a body, and therefore it has no closing tag. Easier to > just throw the slash in there and know without having to do any extra > thinking. The appearance of "<cfset" is enough to tell me that the tag doesn't require an end tag. I don't need another reminder when I get to the end of the line. Until my memory or eye sight gets that bad, the slash is just syntactic sugar. I'm not a big fan of anything that makes code harder to read, and unnecessary characters make code harder to read. Perhaps, if I spent more time in XML or even XHTML, I'd have a different opinion, but I kind of doubt it. The whole point of XML is that you create your own tags. So, just as the parser needs to know where an arbitrarily named tag starts and ends, I need to know. In other words, in XML, there's no trigger in my head that says "<cfset" means there won't be an end tag. In any case, I think we've all given this topic far more attention than it deserves. I certainly wouldn't hold it against a programmer if they used XML syntax in CFML where possible. Ben Rogers http://www.c4.net v.508.240.0051 f.508.240.0057 ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
