Closed mlms13 closed 1 year ago
This would be consistent with the goal to remove mapN
functions (see: #123).
I was previously on the fence, but I think I've decided that the increased flexibility and the fewer concepts for library users to learn makes this change worth it, even if the resulting user code is just a little more verbose.
tupleFromFields
should definitely go... there have been times I wanted that in the past, and even I didn't remember it exists. With the addition of let-ops, that one is way more easily expressed as:And while thinking about that, I started to wonder if the helpers like
tuple2
andtuple3
could also be simplified. I'm thinking something like:The downside is that it's more verbose than what we currently have, but I see several upsides:
JSON-encoded tuples aren't a supper common occurrence in my experience, and the current approach requires quite a bit of code to support. I'll have to think about it, and I'm happy to hear any feedback.
The Plan:
arrayAt
tupleN
tupleAtLeastN
And when these are actually removed in 2.0, I'll make sure to add tuple examples to the docs and also include this change in an upgrade guide.