Member Functions introduced in ColdFusion (2018 release)

In the 2018 release of ColdFusion, we have introduced new Built-In Functions(BIF) to manipulate different objects using a single line invocation. Query Functions QueryDeleteRow( Object query, int rowNum ) QueryDeleteColumn( Object query, String columnName) Arrays Functions ArrayFirst(List list) ArrayLast(List list) XML Functions XmlIsEmpty( XmlNodeList xmlNodeList ) XmlCount( XmlNodeList xml ) XmlAppend( XmlNodeList xml1, XmlNodeList xml2 ) XmlUpdate( XmlNodeList xml, String key, Object value ) XmlKeyList( XmlNodeList xml ) XmlKeyArray( XmlNodeList xml ) Async Functions RunAsync() RunAsync(UDFMethod method) RunAsync(UDFMethod method, long […]

Writing CFMs without Semicolons

Semi-colons have been statement separators for most programming languages. Earlier when processing was slow and memory was expensive, language designers needed to split programs into multiple statements. A few languages required each statement to be on a new line so that the carriage return acted as a delimiter. Some languages required a free format text layout as a separator. Thus, the semi-colon was chosen as a separator so that it doesn’t conflict with other characters, for example, operators for math operations. Many languages do not use semi-colons as statement separator, for […]

Closures in ColdFusion Tags

A Closure is an inner function that has access to outer function’s variables. Closures were earlier supported only in cfscript , now we have extended the functionality to support Closures in ColdFusion Tags as well. So now one can easily invoke Closures in ColdFusion Tags. Some of the code-snippets for using this feature are as follows: <cfset myarray=[ {name=”Thomas”, age=”22″}, {name=”Zaza”, age=”36″}, {name=”Novak”, age=”136″}, {name=”Marin”, age=”361″}, {name=”Rafa”, age=”3″}, {name=”$bl0091@”, age=”-23″} ]> <!— define closure function —> <cfset closure=function (e1,e2){ return […]