3 ms·
From the article: > For example, maybe my worst programming habit is declaring temporary variables like i, j and k as members of each class, so that I didn’t h
by quietbritishjim 7y ago
From the article:
> For example, maybe my worst programming habit is declaring temporary variables like i, j and k as members of each class, so that I didn’t have to declare them inside functions (which is annoying to do in flash for boring reasons). This led to some nasty and difficult to track down bugs, to say the least. In entity collision in particular, several functions will share the same i variable. Infinite loops are possible.
- lukebitts 7y ago> which is annoying to do in flash for boring reasons Does anyone know what are these boring reasons? I've used AS2 and AS3 extensively and don't remember this ever being an issue
- uhoh-itsmaciek 7y agoSame here. The only thing I can think of is variable hoisting, but I don't think that's annoying enough to prefer this other approach.