Open thecoop opened 1 year ago
Note this would be instead of #75431
Pinging @elastic/es-core-infra (Team:Core/Infra)
What are the use cases you see for this feature? As none of the libraries we currently support would support these, I'm having trouble envisioning how useful something like this would be.
I'm primarily thinking of map keys for grouping/sorting, and for data transfer within stream-like constructs.
Python has had tuples since it was created, Java has gone with records instead.
It would be good to add built-in immutable tuples to Painless - an object that is just defined as
(10, "foo", new ArrayList<>())
. Such objects would probably only be accessible asdef
, with built-in implementations for 1 to N-tuples under the hood.The javatuples library is probably a good starting point for implementation/methods.