Details
-
Type:
Sub-task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
if getAt and putAt are used with multiple arguments, they use a list to store the elements. Not only does his require making a list, it also means, that in MetaClassImpl the one of the slowest paths must be taken to select the method. And even if we cache the method, we always have to unwrap the array. Not to mention, that any possible static type information is lost this way. This implementation is from a time where Groovy was not able to do vargs, but today it is and a vargs based implementation has different advantages. For example no rewrapping is needed, we can use use the arguments for the method call directly. theoretically we could transport static type information this way as well and if the implementing getAt/putAt is using a vargs based parameter it can still get an arbitrary number of arguments.
So in the end this change would mean to keep the functionality, but change the rules of the implementation a bit. And because the implementation has to be changed, I consider this a breaking change