We started a document to keep track on all features new to ACF-2018
ATM we have 4 categories:
already supported (green)
partially supported, maybe needs some adjustments for an exact fit (orange)
not supported (red)
not sure (white)
Next step is, we make Jira tickets for every single point in that sheet.
Feel free to comment in every upcoming Jira ticket and vote for the feature you like.
@micstriit A quick review of other languages (JS, java, Python) the ending index is not inclusive meaning it’s “up to but not including”. I would prefer both indexes be inclusive but there seems to be a precedent there in other languages I Adobe probably followed.
@bdw429s when introducing new features into Lucee i always look for existing features that are similar to adapt, in that case i would take the function “mid” as template as we did for the function “ArraySlice”.
what is “offset” and “length”.
implementing typed arrays are not possible in Lucee as they are implemented in ACF.
arrayNew["string"](1);
Lucee supports to use bracked notations to call functions, so the following function call of a component
mycomp.setName("Susi");
can also be done as follows
mycomp["setName"]("Susi");
what allows to set the name dynamically
funcName="setName";
mycomp[funcName]("Susi");
This syntax conflicts with the syntax chosen by ACF for this typed arrays.
Seems they adapted generic types from Java, but in my opinion a bad solution.
Better would be
arrayNew(1,"string");
arrayNew(type:"string");// named arguments
@Zackster good observation!
With 5.3 we move the attribute “synchronized” to the end of the argument list, so it will be
arrayNew(dimension,type, synchronized);
BUT Lucee 5.3 is backward compatible to 5.2, means if someone does
arrayNew(1,true);
it will still work because the function detects if “type” is cast-able to a boolean, in that case it uses the value for “synchronized”.
It is not the first time we handle this in that way and normally this does not cause any problem for existing code.
we also discussed to make the argument “synchronized” obsolete, like we did for structs in the past (structNew("synchronized")). In Lucee all structs are synchronized. So the idea is to make all arrays synchronized.