View Single Post
10-08-15, 11:06 AM   #5
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
Someething every day.

Originally Posted by Torhal View Post
Variables are nothing more than names you use to refer to values. You're not allocating extra memory when declaring them, or even when switching them to hold a completely different value. There is a temporary and negligible allocation under the hood, of course, just as a pointer in C, C++, or equivalent languages has, but it's done on the stack and is thus freed when the variable leaves scope.

You shouldn't be stingy about using variables, since their entire existence is designed to facilitate the flow of logic and readability of your code.
And so we learn something new every day.
Thanks to the both of you (Torhal and Phanx).
__________________
Better to fail then never have tried at all.
  Reply With Quote