Status/Resolution/Reason: To Test//Fixed
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 11/18/2014
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
(see https://issues.jboss.org/browse/RAILO-3252)
Performing queue / stack operations on arrays is fairly common, and whilst doable with delete() / insert() methods, is not as elegant as these specific methods.
splice() is less obvious, and I'm not sure JavaScript (which is where I'm getting the motivation for these) gets it quite right. I see two operations here: basically an "interior" version of push() and pop(), where the items are inserted at the location (moving subsequent items down, not overwriting them), or extracting and returning from the specified location.
Oh: one nice syntactical trick PHP has is that one can push onto an array thus:
someArray[] = "value to put at end of array"
Note the empty square brackets indicate "at the end
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3853251
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: