tracker issue : CF-4013838

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

Revise API for member functions to use a "fluent interface"

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

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

Created: 06/29/2015

Components: Language

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 8

https://en.wikipedia.org/wiki/Fluent_interface

The current implementation of the member functions for structs and arrays etc are a bit of a literal translation from their procedural counterparts. This was less than ideal as those functions tend to return completely pointless boolean values indicating "success" (surely a lack of exception indicates success?)

Instead these should be refactored to return the object they acted on, so as to allow method chaining, eg:

{}.append(key1="value1").append(key2="value2")

etc

I think *some* methods are already "fluent" (although I might be confusing ColdFusion with Lucee here), but any method which current returns a pointless value simply because the equivalent procedural function does should be revised.

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

Watson Bug ID:	4013838

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

Attachments:

Comments:

+1................................
Vote by External U.
6883 | June 29, 2015 04:33:08 AM GMT
+1.............................
Vote by External U.
6884 | June 29, 2015 07:00:15 PM GMT
+1. ColdFusion needs this big time.
Vote by External U.
6885 | July 03, 2015 09:49:39 AM GMT
+1...................................................
Vote by External U.
6886 | July 06, 2015 03:51:08 AM GMT
+1 ......................
Vote by External U.
6887 | December 05, 2015 03:48:35 AM GMT
Any updates on this "review" that it needs?
Comment by External U.
6880 | January 25, 2016 08:30:13 AM GMT
BTW, I think this is a duplicate of this https://bugbase.adobe.com/index.cfm?event=bug&id=CF-3712125 ?
Comment by External U.
6881 | January 26, 2016 02:42:05 PM GMT
Very true. A lot of the time I think "I'm sure I've raised this before", but then can never find them. Am completely fine for the votes for this to be transferred to that one, and it followed up instead.
Comment by External U.
6882 | January 26, 2016 03:08:48 PM GMT
The enhancement requested here is being tracked as part of an other bug, CF-4152471. Closing as Duplicate. 
Comment by Immanuel N.
30559 | March 22, 2019 06:20:02 AM GMT