As I was helping our sister team that uses Blocks, I noticed that function parameters are listed as "global" variables, i.e. lumped into the same menu as "normal" variables.
This is extremely confusing and makes absolutely no sense at all. At a minimum, parameter variables should not "click" into place in functions other than their parents. However, having them be a different color and accessible through the little gear icon on the function (rather than through the variables pane) would also be a good idea.
Additionally, I feel like there's a possibility for undefined behavior here, because (as mentioned before) you can click a parameter block for funcationA into some code functionB. I would have no idea what the value of this variable would be when used outside its parent function. In C, returning a pointer to a local variable will cause undefined behavior because that method's stack will have been freed.
As I was helping our sister team that uses Blocks, I noticed that function parameters are listed as "global" variables, i.e. lumped into the same menu as "normal" variables.
This is extremely confusing and makes absolutely no sense at all. At a minimum, parameter variables should not "click" into place in functions other than their parents. However, having them be a different color and accessible through the little gear icon on the function (rather than through the variables pane) would also be a good idea.
Additionally, I feel like there's a possibility for undefined behavior here, because (as mentioned before) you can click a parameter block for funcationA into some code functionB. I would have no idea what the value of this variable would be when used outside its parent function. In C, returning a pointer to a local variable will cause undefined behavior because that method's stack will have been freed.