am i correct in assuming that there are NO bifs to...
# cfml-general
w
am i correct in assuming that there are NO bifs to add/remove items from an array that returns the array itself and not just a boolean success? that is, there is no existing bif that can do what this arrayAdd function is doing, correct? https://trycf.com/gist/ffd0f18eebfda886883e1725b1843fc0/acf?theme=monokai
l
You can in BoxLang 🙂
w
something that could have been brought to my attention TEN YEARS AGO
but i'll take that as a no for non-boxlang cf
l
Yes no 😢
✔️ 1
t
Well, I think the member function might be able to, because I think you can chain appends...
anArray.append(item).append(anotherItem)
etc. Which sort of implies that it's returning the array, and not a boolean.
w
sure, but outside the member syntax, i should have been more specific
just wasn't sure if there were other array bifs (non-member syntax) that do something else AND return the modified array rather than a success value or the length that i could leverage
c
I think having "sensible" returns from the array BIFs has been asked for numerous times (including as enhancement tickets). IIRC, it has been shot down repeatedly for "backward compatibility". I think originally the member functions didn't return "sensible" values either (they returned booleans), but I think early feedback from users was that this was a terrible design decision and Adobe fixed it.
w
ok, filed under "Indefensible Rationales for Useful Things That Are Still Missing"
b
As was said above the member methods work as expected https://trycf.com/gist/7cdbc7eccd196548343cf5b4a14ba382/lucee5?theme=monokai
w
have to maintain cf10 compat for a while longer, but noted
b
I'll file that under indefensible rationales for using 12 year old software 😉
🤣 1
w
and i'll file that under Preaching to the Choir
🎶 1