You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
I sometimes want to pass multiple parameters to the same functions
Describe the feature / enhancement and how it helps to overcome the problem or limitation
In a nutshell allow passing any number of attributes/parameters to functions by collecting them into a properties built in parameter which is available only inside functions.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Simple example (I know you can use reduce for summing but is just to illustrate what I am proposing)
defadd():
sum=0forvinparameters: # any passed parameters automatically get collected in parameterssum+=vreturnsumdef_ready():
print( add(1,2,3,4,5,6,7,8) ) # properties = [1,2,3,4,5,6,7,8]print( add(1,2,3) ) # properties = [1,2,3]
If this enhancement will not be used often, can it be worked around with a few lines of script?
Right now It can't easily worked. It can be sort of worked around by using dictionaries or variables.
Is there a reason why this should be core and not an add-on in the asset library?
It would require changes to how functions work
The text was updated successfully, but these errors were encountered:
Duplicate of #1034. Feel free to propose your implementation there as a comment, but I think adding global parameters of this kind is a bad idea (see Nim's result out-parameter for an example).
Describe the project you are working on
A 3D game
Describe the problem or limitation you are having in your project
I sometimes want to pass multiple parameters to the same functions
Describe the feature / enhancement and how it helps to overcome the problem or limitation
In a nutshell allow passing any number of attributes/parameters to functions by collecting them into a
properties
built in parameter which is available only inside functions.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Simple example (I know you can use reduce for summing but is just to illustrate what I am proposing)
If this enhancement will not be used often, can it be worked around with a few lines of script?
Right now It can't easily worked. It can be sort of worked around by using dictionaries or variables.
Is there a reason why this should be core and not an add-on in the asset library?
It would require changes to how functions work
The text was updated successfully, but these errors were encountered: