Some generative art with ACF <https://trycf.com/gi...
# cfml-general
z
a
This is a problematic statement:
Copy code
// When using argument collection in function declare
That's not what's going on. The code is not using the
argumentCollection
in the CFML sense - which is only a thing when calling a function - it's simply declaring a parameter called
argumentCollection
and it's defaulting it to all the value of all the arguments. So of course there's going to be recursion going on. It's the same as going
st = {}; st.key=st;
. It's also a really convoluted example. It can be simplified to:
Copy code
function f(x, y=arguments){
    writeDump(arguments)
}

f(1)
https://trycf.com/gist/ef1b0fbe1035483e1486f3d3cf8b4bae/lucee5?theme=monokai This has the benefit of not being as misleading as to what's going on.