tracker issue : CF-4104564

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

[ANeff] ER for: CF self-documentation as part of any possible language overhaul

| View in Tracker

Status/Resolution/Reason: Closed/Deferred/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 01/06/2016

Components: Language

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Win All

Vote Count: 0

The docs are often not sync'd with what CF actually supports. It is useful when CF is self-documenting. Example:

1) Currently, getFunctionList() returns the built-in functions
2) Currently, SERVER.coldfusion.serviceTagAttributes returns the service tag attributes
3) Currently, when an invalid tag attribute combination is specified, then CF's exception message lists the valid combinations

If there will ever be a language overhaul (ex: a CFML 2.0), I would like self-documentation to be considered. I would like to propose a single function or variable that documents what the installed CF version supports.

Possible suggestions: SERVER.cfml or getCFInfo() or getCFMLInfo()

Result would be a struct. Example:

{
  functions = "abs,cos,.."
  memberfunctions = {array="append,avg,..", date="add,convert,.."},
  tags = "cfabort,cfajaximport,..",
  keywords = "continue,default,error,file,for,form,hash,is,ne,now,session,..";
  attributecombinations = {
    cfpdf = [
      "action,source,destination",
      "action,source,name",..
    ],..
  }
  parametercombinations = {
    arrayappend = [
      "array,value",
      "array,value,merge",..
    ]
  },..
}

This info would be useful for:
- Adobe, to power aspects of their documentation to ensure it is sync'd with what CF currently supports.
- Adobe, to power aspects of ColdFusion Builder to ensure it is sync'd with what CF currently supports.
- Any alpha/beta tester that wants to know what was introduced/changed in a new version.
- Any developer writing tooling that needs to know what a version supports.

I'm not requesting this for Raijin. I am requesting this as part of any possible future language overhaul (ex: a CFML 2.0). Please defer until then. I am just creating this ticket for public discussion.

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

Watson Bug ID:	4104564

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email:

Attachments:

Comments:

keywords = "continue,default,error,file,for,form,hash,is,ne,now,session,.."; should've been reservedwords = "continue,default,error,file,for,form,hash,is,ne,now,session,..";
Comment by External U.
4922 | January 06, 2016 05:05:35 PM GMT
We need to evaluate this, so deferring it for 11/Raijin. We would be interested to know what other users think of this.
Comment by Vamseekrishna N.
4923 | January 07, 2016 02:59:31 AM GMT
Hi Vamsee, Thanks very much. One possible idea is to reduce the scope of this ticket for now. For now, it could simply return a struct w/ 2 lists: {functions="abs,cos,..", tags="cfabort,cfajaximport,.."}. Then, getFunctionList() could be deprecated and getTagList() would not be needed. Then, based on feedback from other users, it could possibly return additional lists in the future. Thanks!, -Aaron
Comment by External U.
4924 | January 07, 2016 03:28:35 AM GMT
To clarify further: if this is implemented then CF-4104256 isn't necessary. Thanks!, -Aaron
Comment by External U.
4925 | January 07, 2016 03:54:02 AM GMT
Just noting I like [url=http://blog.adamcameron.me/2016/01/reflection-on-cfml-tags-and-functions.html]Adam's suggestion[/url] of a CFML object w/ methods. Thanks!, -Aaron
Comment by External U.
4926 | January 10, 2016 06:29:30 AM GMT
Oops, wrong formatting in my last comment. But it should still be interpretable.
Comment by External U.
4927 | January 10, 2016 06:32:21 AM GMT
I tried using spreadsheetNew().getClass().getMethods() to find all of a spreadsheet object's member functions. I called .getName() on each result, but not all of the member functions are listed. I hope this ER is considered for Aether. Adam's idea for a CFML object w/ methods would be nice: http://blog.adamcameron.me/2016/01/reflection-on-cfml-tags-and-functions.html Thanks!, -Aaron
Comment by External U.
4928 | May 31, 2016 03:57:23 AM GMT
Hi Adobe, Can you please re-open for CF2020 consideration. I see Lucee has getFunctionData(). But I need ability to see what member functions exist on each type, since CF's so quirky and unpredictable when it comes to member functions existing or not. Or just make member functions type-casting, since type-specific is unhelpful to CF developers in a type-casting language? Thanks!, -Aaron
Comment by Aaron N.
29097 | June 20, 2018 03:18:19 AM GMT