Monday 15 December 2014

Say "no" to Adobe and their bloody stupid generic CFScript syntax

Firstly, sorry this blog has been a bit of a non-event recently. There's various reasons for this - none of them interesting - but I'll get back on form soon. -ish.

Now. Frickin' Adobe.

Ray hit me up about about an issue he was having with the "CFScript" version of <cfwddx>: not being able to get it work. This turned out to be because he was guessing the syntax (and in the normal world it would have been a good guess), but got it wrong.

He was trying something like this:

w = cfwddx(action="cfml2wddx", input={});

This makes sense: calling a function that does something to some inputs and returns a value. But... no... this is not how the Adobe ColdFusion Team have implemented their WDDXing support for CFScript. Oh no. This is the symtax:

cfwddx(action="cfml2wddx", input={}, output="w");

I'm not joking. Someone on the ColdFusion Team sure is. Someone who has a say in the language design. I can assure you though, sunshine: no-one's f***in' laughing. Well they might be laughing at you.

What sort of idiotic world is the ColdFusion Team residing in?

If anyone with a clue was to design the functionality here, we'd have this:

w = toWddx(someValue);



There: sensible, and fits with the rest of the language.

Converting it back?

someValue = deserializeWddx(w);

Simple. And obvious.

But instead of providing something sensible that shows a hint of language design and compatibility with the rest of the language (or even a nod to how any programming language is written!), Adobe instead goes "nah, that'd be like... well... that'd be like doing work. We'll just given them one shithouse generic solution for the whole lot".

Which would have to be the poorest language-design decision in a language which doesn't exactly garner too many plaudits for its language design to start with.


Anyway, I've raised a ticket. let's get our language sorted out: 'Revise how "generic" CFScript syntax works' (3909712)

Please go and vote and generally rattle some Adobe cages. They need to stop ruining our language.