An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

CFML2009, ColdFusion, Railo and Open BlueDragon

July 9, 2009 ·

I've talked about the CFML Advisory Committee before and explained that we're working on a specification for the ColdFusion Markup Language that we hope to release this year as CFML2009 and then review every two years. CFML2009 is intended to be a specification of what the language should be by the end of this year. Ben Forta just posted about some CFML enhancements coming soon in ColdFusion 9 but he didn't mention that many of these will be embodied in the CFML2009 spec. I figured it was worth looking at some of the items in his blog post through the lens of the Advisory Committee. Where these features are deemed "core" by the Advisory Committee, expect all CFML engines to provide them fairly quickly. Some features are supported already by one or more vendor, some are new to all three vendors.The first enhancement is to allow assignments to be chained. This is common in many C-like languages because an assignment is an expression and the value of that expression is the value assigned. This, and the ability to var-declare several variables at once, will be part of CFML2009:
<cfset var a = b = c = 0 />
This is already supported in Railo 3.1. I'm not sure about Open BlueDragon's handling of this. Next up is the ternary operator (booleanExpression ? trueValue : falseValue) which is also common in C-like languages. This was adopted as part of CFML2009 during the committee's early voting on expressions even tho', at the time, only Railo supported it. Ben talks about struct and array literals which were introduced in ColdFusion 8 but only for simple assignments. In the CFML2009 spec, these will be first class expressions and therefore usable everywhere:
<cfreturn { success = true, data = [ 1, 2, 3, 4 ] } />
This is already supported in Railo 3.1. Open BlueDragon has this on their roadmap for 1.4. CFML2009 will add a <cfcontinue> tag to match the continue keyword in CFSCRIPT (an odd case of CFSCRIPT having a feature that was not present as a tag). Railo 3.1 and Open BlueDragon 1.1 already have this tag. CFML2009 adds finally (and <cffinally>) which Railo 3.1 already supports. Open BlueDragon's roadmap shows this scheduled for 2.0. CFML2009 specifies a lot of enhancements to function declarations in CFSCRIPT, including the ability to specify return types, access specifiers and so on. Railo 3.1 allows you to specify argument types and defaults (covered in this blog post) but full support for components as CFSCRIPT is coming in ColdFusion 9 (and is on the roadmap for Railo, probably 3.2 later this year, and Open BlueDragon 2.0 because these are core language features). Ben mentions several new operators in CFSCRIPT that match existing tags (e.g., abort) and these will all be part of core language in CFML2009 and therefore on every vendor's roadmap, with ColdFusion 9 the first to implement them. Being able to use throw in CFSCRIPT will be a huge step forward in my opinion! Ben also says that "You can invoke any tags and functions in CFSCRIPT" and this is an area that the Advisory Committee have been struggling with. I blogged about our deliberations here and here to show how difficult it has been to reach consensus on a way to do this. In fact, the committee still hasn't completed voting on this particular set of issues (with two committee members not yet voting). It's a very difficult problem to solve and it's very difficult to obtain consensus on some of these issues. The committee meets again tomorrow and this will be on the agenda! When Ben visited BACFUG, he mentioned there would be a <cfimap> tag in ColdFusion 9. This is also something that the Advisory Committee had agreed should be part of the core language but the two implementations so far (Railo and Open BlueDragon) have some different attributes and it's possible (likely!) that Adobe's implementation in ColdFusion 9 will be different from both existing implementations. As the committee works through all the function arguments and tag attributes, we have to try to resolve these differences to reach consensus on which attributes are core language, which are extended core and which are vendor-specific. It's great to see CFML moving forward with all three vendors tracking the upcoming CFML2009 spec. I think CFUnited is going to be a very interesting conference with a lot of announcements and a lot of information about where CFML is headed and where all three vendors are focusing their efforts!

Tags: adobe · cfml-advisory · cfunited09 · coldfusion · openbd · railo

2 responses

  • 1 ziggy // Jul 10, 2009 at 10:56 PM

    &gt;&gt;cfset var a = b = c = 0

    Sean, are you still planning to fire anyone who uses this new standard? ;-)

    ----------------------

    One thing I truly hate not having in cfscript is the ability to string together variables and set them all to one value as in js:

    a=b=c=d=f=g=h=i=0; j=k=l=m=n=&quot;&quot;;

    And the ++ business is annoying as well.

    Posted By stylo~ / Posted At 12/12/04 12:36 AM

    ------

    stylo, if you worked for me and wrote code like that, I'd fire you!

    Code for clarity and maintainability - don't just try to save whitespace!

    Posted By Sean Corfield / Posted At 12/12/04 1:45 PM

    --------

    Looks clear as a bell to me :-) (Course it's supposed to be on 2 lines.)

    It's actually for clarity and maintainability, not whitespace. Far better than writing 20 set statements to plough through or make a mistake on I'd say. Either way, the point is you can do it in js but not cfscript.

    Posted By stylo~ / Posted At 12/12/04 9:41 PM

    ------------------------

  • 2 Sean Corfield // Jul 12, 2009 at 12:51 AM

    @ziggy, ah, ever the troll :)

    Just because something is possible in a language doesn't mean it should be used. No, I wouldn't want my team to write code like that.