evalexpr icon indicating copy to clipboard operation
evalexpr copied to clipboard

Support size one tuples

Open ISibboI opened this issue 5 years ago • 2 comments

Tuples are required to be created with the comma operator as of now. It should be possible to create size one tuples using parentheses as well.

ISibboI avatar Aug 29 '19 08:08 ISibboI

I'd love to look into this one as well -- In my project I am dynamically mapping values from a database to evaluate custom validations. Some of these might be vecs/arrays of length 1. It seems that tuples with length 1 convert to primitive types in this case?

nickisyourfan avatar May 10 '23 17:05 nickisyourfan

Good point, that is true. So far, tuples are created by the comma operator, which is n-ary for n at least 2. Maybe a simple built-in function could help? Something like tuple or so.

ISibboI avatar May 16 '23 14:05 ISibboI