Allow functions with single output return primitive type

Hello, I apologize if this is a duplicate but I couldn’t quite find anything that matches. This subject has many topics on it.

I would be very pleased to see an option to have functions with a single output return primitive types instead of objects with a single element. Currently, even if a function returns only a single thing, I need to store the output as an object.
Having single element objects is unintuitive. This also makes function integration more difficult. For example, if I’m replacing a looper widget that modifies a variable used widely in the app, I need to either:

  1. Store the results of the function somewhere else, then do an additional data manipulation to move the object’s value to that variable.
  2. Change every use of that variable to reference that object element instead. If I change the number of outputs to the function later, I need to create a totally new variable object to store it, then modify every single use again to reference the new object.

I could see returning a primitive type being an issue later on if I decide to make that function return more than one thing, so an object is the only option for return type. But, changing the number of function outputs already requires you to adjust every call to that function anyway.

Hey @enewton , we’d tackle this together with your function output thread, since both change how functions hand back values. That one isn’t planned right now for the reasons I gave there, so this one waits with it. I get the friction with single-element objects though, and I’ll update both threads if anything moves.