list member functions need to be prefixed with the word "list"

Description

Currently it seems like some list member functions have been implemented without a `list` prefix, eg: `String.reduce()` `String.filter()`. However this is "less than ideal" for a few reasons:

  1. ColdFusion prefixes these methods with "list" so as to more clearly identify they're not working on the plain old string. So you have an incompat. See https://bugbase.adobe.com/index.cfm?event=bug&id=3752316 for further discussion on this.

  2. A method on a string should treat the string just as a string, without "hiding" any special meaning like "actually we're treating it like a char-delimited list", as per this case.

  3. Doing it this way blocks you from having actual string member functions for these, eg: treating a string like a collection of characters (see LDEV-386).

Activity

Brad Wood 
20 October 2021 at 16:50

This is not fixed as the original member functions string.map() and string.each() were left in place and now are causing an incompatibility with Adobe CF. I’ll enter a new ticket for that.

Adam Cameron 
25 November 2016 at 21:29

When you say "already"... were they there when I first raised the ticket? It would surprise me if that was the case, given I went to the effort of raising the ticket 'n' all? Did I mess something up?

Michael Offner 
25 November 2016 at 20:55

already fixed

Michael Offner 
25 November 2016 at 20:54

this function already exists with Lucee 4.5 and Lucee 5.0.

Duplicate

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Priority

Created 4 June 2015 at 13:25
Updated 20 October 2021 at 16:56
Resolved 25 November 2016 at 20:55