Tuple outputs auto naming

Since the tuple split seems to know the pin names it got data fed from, why not carry them over to auto name pads or outputs created from the split.

1 Like

Yea would be kinda nice!

sorry my bad, these are the types that are shown in the hint, not the pin names. i was not looking carefully. HttpStatusCode pin just happens to be named like its type. nevermind.

Well normal c# tuple is something like:

var someString = "hi";
var someNumber = 1;

var someTuple = new{ someString, someNumber };

Console.WriteLine(someTuple.someString);
Console.WriteLine(someTuple);
hi
{ someString = hi, someNumber = 1 }

So…

i see. well then.. could be pretty convenient.
but my initial observation was still brain fart.

Naming indeed is important and can improve the readability of a patch a lot.
For now this feature isn’t planned as there is a straight-forward way to get nice naming by declaring a custom type.

You get a tuple like named type in a matter of seconds by creating a Record, giving it a name, turning on generic, adding some pads with nice names, selecting all and pressing Ctrl-K. You now have a tuple, that similarly to the orignal tuple is generic, has create and split, and comes with meaningful names.

true that there is no point using tuples when you can have a sleek record. i still like using tuples where a record feels overkill and slow to setup. namely for quick prototyping, testing or as one time/place use to get more than one output from a reactive region and such. i disagree with your time estimate. spawning 2 tuple nodes is a matter of seconds, setting up a record is absolutely not, especially regarding all the typing and clicking you still need to do.

1 Like

Totally agree, creating a simple data type is just too many clicks, tabs, and typing. I’ve never seen someone replace a Tuple with a custom datatype voluntarily.

I also disagree when it comes to ValueTuple, as you can’t declare structs in VL. ValueTuple gets instantiated on the stack, while all datatypes you can declare in VL are instantiated on the heap.