Railo dropped a second beta last night. Get it here. They've also added a WAR download, though it only works when installed into an existing "express" installation. Hopefully that'll get addressed for the next release.
A couple shining points about the runtime:
- Array and Struct literals (the [...] and {…} notation) are expressions, exactly as they should be, unlike other CFML runtimes (cough…Coldfusion…cough).
- Arrays and Structs now implement java.util.List and java.util.Map respectively, greatly easing Java integration. This also allows the Comparators CF Groovy example I published to work correctly on Railo.
Pardon my ignorance, but what is an "expression" installation?
Also, what exactly does it mean that the array and struct literals are expressions?
Thanks.
~Brad
Brad,
I meant "express" installation, which is the Railo/Jetty combined bundle. I've fixed the post.
On ColdFusion, array and struct literals are an extension to the assignment statement syntax. That is, they can only be used inside assignment statements (x = []). Contrast this with an expression such as "1 + 2″. The right side of an assignment statement is always an expression (except if it's an array/struct literal), so you can do this: <cfset x = 1 + 2 />. Similarly, CFRETURN takes an expression, so you can do this: <cfreturn 1 + 2 />. Method invocations, tag attributes, hashes in CFOUTPUT, CFIF/CFELSEIF, etc. all accept expressions. However, since ColdFusion doesn't implement struct and array literals as expressions, you can't use them in any of those places. Railo doesn't have that deficiency. Make sense?
Here's two examples of literal usage that leverage the expression-ness of the literals. They'll work on Railo, but not on ColdFusion:
<cfreturn {
query = myQuery,
result = myResult
} />
<cfif arrayLen([1, 2, 3]) EQ 3>
</cfif>
Ah– thank you so much for the clarification. That makes perfect sense. In fact I hadn't even thought of of those uses before. Sounds like I need to "Go Wish" something to Adobe. :)
~Brad
[...] been released, with several improvements which Michael Streit explains on the offical Railo blog. Barney Boisvert talks about the significance of the array and struct improvements, and Raymond Camden points out the new variable scope handling [...]