Is there any difference between free variable and global variable? Or they are just  synonyms? In which situations I should use one or another?
Difference between free and global variables
terminology;programming languages
They don't play in the same category.The notion of free variable is relative to a scope. If a variable is present in a term (i.e. a subprogram) and its scope is larger than this term, then the variable is said to be free in that term.A global variable is one whose scope is the whole program, or the whole file, or the whole module, or whatever scope is called global in the programming language you're considering.