#question about for loop
1 messages · Page 1 of 1 (latest)
this only serves to demonstrate that you are not using the variable "i"
i think there's no performance difference
oh
i guess that still is kind of useful to use
anyway thanks
there is potentialy a small perfomence dif, _ is marked for roblox as unused, roblox is probably not asignating the index to _
the first 2 things are vairables
i,v for example
_ is just no variable cuz you dont care about the index
so just cleaner code and be able to use i for something else
Cleaner how
yes.
_ is parsed as a useless variable, using it in the for will tell roblox not to asigne the value, it remove like one instruction
It’s the same loop, like other people have said, “__” is basically just reminding yourself that you won’t be using that variable.
If you want to, you can absolutely still reference “__” but you should give it a proper name if you do.
not sure why the formatting is all fucked up now
i literally never use _ i always use i out of habit even if i dont need it
using _ is better for the understanding of the code, it also remove one instruction so roblox run faster (probably a nano second) using _ is kind of good to remind your self that you don't use it, like other said
The understanding partly
Barely
Ye it removes an instruction but it doesn’t do that much in terms of understanding
it do so mutch for readability
Elaborate
when you see _ you know it will never be used, when you see i you need to check if its used
its why conventions are existing
That’s not readability
human readability
It’s a good indicator tho
Indicators are for readability ^^ like types for exemple
types are for auto complete
and readability.
it remind your self what is what, it help a lot
why tf