tracker issue : CF-3909712

select a category, or use search below
(searches all categories and all time range)
Title:

Revise how "generic" CFScript syntax works

| View in Tracker

Status/Resolution/Reason: To Fix/Deferred/EnhancementRequired

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 12/15/2014

Components: Language

Versions: 11.0

Failure Type: Usability Issue

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Most users will encounter

Locale/System: ALL / Platforms All

Vote Count: 20

This is appallingly awful syntax:

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

a) It looks like a function, but isn't a function (although it SHOULD be a function!) 
b) and it returns a value but one needs to pass the name of a variable INTO the construct.

This is ludicrous.  Ludicrous.

Functionality like this should have been implemented like this:

w = wddx({}, "cfml2wddx"); // although for non-WDDX input in the first argument, the action can be inferred.

Or perhaps:

w = cfmlToWddx(/* etc */);

Or *better*, have a .toWddx() method on the various CFML data types. THAT would be a good solution. You should aim for good solutions, not ratshit lazy ones like you've given us in CF11.

And I don't just mean cfwddx()... I mean ALL of the previously tag-only functionality needs to be revisited. You need to do your jobs like professionals. Your clients rely on this. And pay for this.

-- 
Adam

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3909712

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

This would sure throw me off too and would have to be constantly looking at docs and debugging.
Vote by External U.
9375 | December 15, 2014 12:37:44 PM GMT
It only makes logical sense that the function would return a variable. We shouldn't be specifying a variable to return like CFML tag syntax. Drop the CF prefix. It's silly in script syntax, what else would it be? A member function would also make more sense in the case of WDDX. It's more object-oriented and behaves more inline with other data types that have seen member functions implemented.
Vote by External U.
9376 | December 15, 2014 12:39:19 PM GMT
Function is as function does NOT as tag does...
Vote by External U.
9377 | December 15, 2014 12:43:58 PM GMT
+1. I think I just threw up in my mouth a little bit seeing that code. Ugh.
Vote by External U.
9378 | December 15, 2014 01:02:51 PM GMT
I could not agree more with what Adam has taken the time to write up here. Adobe should be ashamed of this syntax.
Vote by External U.
9379 | December 15, 2014 01:22:27 PM GMT
Off the top of my head, I know CFSpreadsheet works this way too. Unacceptable.
Vote by External U.
9380 | December 15, 2014 02:15:04 PM GMT
nuts! Please fix this................
Vote by External U.
9381 | December 15, 2014 02:31:47 PM GMT
The generic tag-to-script approach was never a good idea, and was never one that your community was supportive of. Please fix. You can avoid much of backwards compatibility concerns by just deprecating the cf prefix in the script function names and then implementing it correctly with proper, meaningful function names.
Vote by External U.
9382 | December 15, 2014 05:29:49 PM GMT
+1 ..... And please don't defer and close, and plan on getting to it some time in the future... CF11 hotfix 5 or 6
Vote by External U.
9383 | December 15, 2014 09:04:36 PM GMT
We should always think about aesthetics of a language. This is ugly syntax.
Vote by External U.
9384 | December 15, 2014 11:38:53 PM GMT
+1........................................................
Vote by External U.
9385 | December 16, 2014 03:36:34 AM GMT
Not only does this drive CURRENT CF developers batty, this is why any one that doesn't already use CF already tries it and then throws their hands up in frustration at the total lack of consistency in the language (or with any other programming language). You cannot call it a RAD language when it trips up developers so easily.
Vote by External U.
9386 | December 16, 2014 01:39:05 PM GMT
+1..........................................................................................................
Vote by External U.
9387 | December 16, 2014 04:43:54 PM GMT
Yes we technically have 100% tag to script capability but this was obviously just a lazy way of getting there. Now us developers (ie. the users) are stuck with a half arsed attempt at a proper language that actually slows development down, not speed it up. Adobe take some pride in your work for once and fix this shit.
Vote by External U.
9388 | December 16, 2014 05:52:28 PM GMT
+1...................................................
Vote by External U.
9389 | December 16, 2014 10:29:37 PM GMT
+1 - This is counterintuitive b/c a function should work like a function. The return variable name shouldn't have to be passed into the function.
Vote by External U.
9390 | December 18, 2014 12:56:12 AM GMT
Couldn't agree more. Quality development seems to be a thing of the past.
Vote by External U.
9391 | December 19, 2014 01:03:13 AM GMT
Syntax like that is not intuitive, goes against all precedence and is just so left field. Please stop giving cf critics ammo. It may not cause an exception, but it sure causes a lot of *facepalm* O_o
Vote by External U.
9392 | February 18, 2015 09:01:30 AM GMT
Not planned for this release.
Comment by Rupesh K.
9373 | July 09, 2015 12:03:16 AM GMT
That's disappointing. You guys really damaged the credibility of CFML as a viable language with your approach to CFScript-ifying functionality that was previously only available in tags, in CF11.
Comment by External U.
9374 | July 10, 2015 03:55:52 AM GMT
Just awful language design. Are there any language architects on the ColdFusion team?
Vote by Dave M.
9393 | February 14, 2017 01:25:43 PM GMT
Hi Adobe, I received an email notification, from this ticket, saying: "Target Version updated to 'Alpha'". What does Alpha mean, in terms of CF2018? Or do you mean CF2020 Alpha? What change(s) do you propose? Could you please keep us in the loop? Thanks!, -Aaron
Comment by Aaron N.
30402 | February 27, 2019 12:18:17 PM GMT