On 10/13/05, Chris Stoner <[EMAIL PROTECTED]> wrote: > While I agree that it isn't a compiled language in the same sense that you > compile it yourself within your IDE, it is my understanding that cold fusion > is itself a cf to java compiler (among other things). So the compile time > checking "could" happen, but not in the same why you would see in java. At > first run (compile) time the interface implementation could be checked and > an error could be thrown/displayed to the page like any other CF Exception.
No, that's not how it works. All the type-checking occurs at runtime because CF is typeless and dynamically bound. When you have <cfcomponent extends="foo"> the component is compiled standalone but only at runtime is the associated made with a given foo type. Interfaces could provide simple "type tagging" which is what I think most people would actually need. Forcing full API checking at runtime would be a mistake, IMO. > I agree this is the overall desired goal of interfaces in CF but if the > interface is not enforced it becomes somewhat useless doesn't it? What good > is type checking if the CFC/Object doesn't fit the description of what that > type is? Does it really matter whether you get a runtime error that says method not defined rather than component does not implement method from foo? The end result is the same: a runtime exception. -- Sean A Corfield -- http://corfield.org/ Got frameworks? "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ---------------------------------------------------------- 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]
