

- Blogs
- Discussion
- arraynew[type](params) vs object[method](params)
Hi all,
Aether has 3 typed-array creation syntaxes:
1) ArrayNew(dataType=____)
2) [dataType][]
3) ArrayNew[dataType](params)
Long-time community ask is for method invocation syntax object[method](params). See its conflict w/ #3? Lucee isn’t implementing #3 b/c it conflicts w/ their object[method](params) support.
Proposal: A) Remove #3 or B ) replace it w/ ArrayNew(dimension[, dataType])
Possible conflicts:
1) ArrayNew(dimension[, dataType]) conflicts w/ ArrayNew(dimension[, isSynchronized]) if dataType is a CFC named true.cfc or no.cfc, for example
2) object[method](params) conflicts w/ ArrayNew[dataType](params) if object is a CFC named arraynew.cfc
Both conflicts should be considered equally.
If ArrayNew[dataType](params) cannot be changed to ArrayNew(dimension[, dataType]) due to conflict #1, then ArrayNew[dataType](params) should not be introduced due to conflict #2.
Thus, preferred proposal is A. I filed this as https://tracker.adobe.com/#/view/CF-4202139 which Adobe closed without comment.
Thoughts? Explanation, Adobe?
Thanks!,
-Aaron
Hi all,
Aether has 3 typed-array creation syntaxes:
1) ArrayNew(dataType=____)
2) [dataType][]
3) ArrayNew[dataType](params)
Long-time community ask is for method invocation syntax object[method](params). See its conflict w/ #3? Lucee isn’t implementing #3 b/c it conflicts w/ their object[method](params) support.
Proposal: A) Remove #3 or B ) replace it w/ ArrayNew(dimension[, dataType])
Possible conflicts:
1) ArrayNew(dimension[, dataType]) conflicts w/ ArrayNew(dimension[, isSynchronized]) if dataType is a CFC named true.cfc or no.cfc, for example
2) object[method](params) conflicts w/ ArrayNew[dataType](params) if object is a CFC named arraynew.cfc
Both conflicts should be considered equally.
If ArrayNew[dataType](params) cannot be changed to ArrayNew(dimension[, dataType]) due to conflict #1, then ArrayNew[dataType](params) should not be introduced due to conflict #2.
Thus, preferred proposal is A. I filed this as https://tracker.adobe.com/#/view/CF-4202139 which Adobe closed without comment.
Thoughts? Explanation, Adobe?
Thanks!,
-Aaron

- Most Recent
- Most Relevant
The array is a linear data structure used to store data in memory. Array using indexing and we have to index the elements of the array. https://printerchatsupport.co.uk/dell-printer-support/ visit this link to solve array related problem. The main disadvantage is the once we insert a data, we can not change it further.
Hi Kama,
That’s a good point. I agree `isSynchronized` would need required if `dataType` was specified using positional parameters.
Thanks!,
-Aaron
I agree that #3 is unnecessary new syntax. I’m not sure why you propose ArrayNew(dimension[, dataType]). What’s wrong with adding a third parameter? It doesn’t make sense to me that isSynchronized and dataType would be mutually exclusive.
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