tracker issue : CF-4202139

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

[ANeff] Bug for: ArrayNew[dataType](1) syntax won't be used and should be removed

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/

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

Created: 04/26/2018

Components: Language, Functions

Versions: 2018

Failure Type: Others

Found In Build/Fixed In Build: 2018.0.01.308605 /

Priority/Frequency: Normal /

Locale/System: / Platforms All

Vote Count: 1

Issue: ArrayNew[dataType](1) syntax won't be used and should be removed

CF2018 is adding 3 syntax for creating typed array:
 1) ["string"][](
 2) ArrayNew(dataType="string") (to support Named Arguments ArgumentCollection)
 3) ArrayNew["string"](1)

#1 is useful/short and #2 is necessary, there is no need to introduce an entirely new BIFName[brackets](parentheses) syntax into CFML.

Users will type shorter ["string"][], not longer ArrayNew["string"](1).

Suggestion: ArrayNew["string"](1) should be removed.

Related thread: [https://forums.adobeprerelease.com/coldfusionpr/discussion/130/syntax-for-typed-arrays]

Attachments:

Comments:

Hi Adobe, This ticket needs re-opened/fixed b/c `ArrayNew[dataType](1)` syntax conflicts with the `object[method](params)` that will be introduced per CF-3033950 and CF-4035747. Thanks!, -Aaron
Comment by Aaron N.
27682 | May 05, 2018 02:07:50 AM GMT
Hi Adobe, Could you please shed some light on your plans for object[method](params) and how the similar ArrayNew[dataType](1) syntax might impact those plans? Thanks!, -Aaron
Comment by Aaron N.
27784 | May 13, 2018 09:33:24 AM GMT
Hi Adobe, Adding more comments from https://coldfusion.adobe.com/?p=2873: ----------- James Mohler: I thought that ArrayNew[dataType](params) is just a strange way of doing things. I can’t think of any other BIF that has this syntax ----------- ----------- Kama Sama I agree that [ArrayNew[dataType](params)] is unnecessary new syntax. ----------- Can you please re-consider? No one actually _wants_ this syntax that doesn't match any other BIF and is too much typing compared to the alternative syntaxes. Thanks!, -Aaron
Comment by Aaron N.
29103 | June 20, 2018 06:36:09 AM GMT
If it's too late to remove the syntax from GM, can you please not document it and remove it in the next update? Thanks!, -Aaron
Comment by Aaron N.
29104 | June 20, 2018 06:36:57 AM GMT