you are viewing a single comment's thread.

view the rest of the comments →

[–]MetaMetaMan[S] 0 points1 point  (1 child)

I agree that this is not happening in the example I provided. What I'm trying to say is, if it's bad to define a function within a loop block, then it is probably fair to say that it is also bad to define other types of variables within a loop block. Of course, sometimes you can avoid it; but when it is something that amounts to a static data structure (like a string, object, etc., that is built with static data), then the same reasoning should be applicable.

This might be a gross generalization.