Title:
sort higher order functions should return the sorted object, not simply "YES"
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron ()
Created: 04/30/2017
Components: Language, Functions
Versions: 2016
Failure Type: Others
Found In Build/Fixed In Build: all / 2018.0.0.307160
Priority/Frequency: Normal /
Locale/System: / Platforms All
Vote Count: 4
See http://blog.adamcameron.me/2017/04/cfml-lucee-13-v-4-14-v-6-coldfusion-we.html
member functions like Query.sort(), Array.sort() etc should return the sorted collection, not simply return a pointless boolean. Methods cannot be chained if you don't return the object itself.
Also these functions should *not* change the original object, although I get for backwards compat reasons you've perhaps painted yerself into a corner with that.
Changing the methods to at least return the same object should be low-risk as the current return value is not meaningful or useful.
Attachments:
Comments: