float @wallwidth;
then that is the same as doing
float @wallwidth = 0;
I am speaking of treating attributes like global variables.
If I have already created my attribute with
float @wallwidth
then I am not going to do it again, so it doesn't matter.
If I want to change it's value I will just use
@wallwidth = whatever;
I could be wrong, but I think the op is looking at how to ‘structure’ his code in terms of variables. Which is why I am presenting it the way I did.
But I think you are looking at more from the typical use of wrangles in run over mode.
For myself with what I like to do with wrangles, it makes much more sense to run in detail mode.
And because vex syntax is similar to c, running in detail mode allows me to structure my code that I understand and find easier to read than having to consider what is happening in run over mode with my code.
I also make use of functions that might have a few hundred lines of code that I simply put in a *.h file and reference that function with #include<file> in my wrangler.
So in my wrangler I might initially at the top have a few lines of defined local variables, and some ‘global variables’( I know technically - attribute) that I know I will be using elsewhere.
Then I will have a few functions that could represent together a couple thousand lines of codes.
So when I am using the ‘convention’:
#include <C:/functions A to C/AtoC.h>
float @mywall;
float tempwall;
flat @newwall;
tempwall = functionA();
@mywall = functionB( tempwall, blah);
@newall = functionC ( @mywall, tempwall);
…and so on.
I find it's a great approach in writing and reading code.
Of course this is just my personal way but I don't find it confusing to look at and treat a user created attribute as a ‘gobal variable’.
The original poster alluded to a background in other programming languages and was using the language of creating global variables.
I think my explanation lends itself to that orientation and really isn't confusing.
Except to say, I would agree if one starts to ‘mix and match’ their approach by using some detail mode and run over mode, then your point about the difference between
float @wallwidth = 1;
and
f@mywall = 1;
is important to know.