Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 05/14/2013
Components: Language
Versions: 10.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: Final /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Platforms All
Vote Count: 9
G'day:
I think it’d be timely for CFML to retask most of its type-specific functions as object methods. As Railo has done. EG:
keys = myStruct.keyList();
length = myArray.len();
result = myXml.search(xpath);
// etc
At the same time, promote all these methods to be first class, so they can be used as callbacks. Currently if one wants to have a function to - for example - uppercase each element of an array, one cannot simply give ucase() as a callback, one needs to wrap it in a UDF. Which isn’t the end of the world, but it’s just... something that would be nice not to have to do.
I also like how in languages like Javascript "even literals are objects", so one can do this:
"G’day World!".length();
This is not something one would generally do, but it demonstrates an architectural elegance that CFML doesn’t have at the moment.
[...]
I think it’s a mis-step in the language to add OO to it for developer-written code, but not embrace OO in the language itself. It leaves CFML being a bit of a mishmash.
I’m not suggesting getting rid of the more procedurally-oriented versions of the functionality, because a lot of ppl will still be coding that way; but this should not prevent CFML additionally moving more towards OO itself.
This might not be an exciting feature for IT Managers (although if they’d probably already expect it to be the case), but for the people who seem to do most of ColdFusion’s marketing - the vocal part of the dev community - this would be a significant feature.
--
Adam
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3559652
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: