I’ve noticed that functions require that they be declared before they can
be used. This came as somewhat as a blow as I orgaznie my code by putting
my main code first, and function listing at the end. Is this set in stone?
Plans to change? Reasoning?
This is not likely to change. Ruby processes the file from beginning
to end and evaluates calls and definitions as they are encountered.
Ruby is dynamic, everything can be redefined and any other evaluation
order would likely lead to confusion, incompability and other
problems, in situations such as:
If you want to keep your style, I suggest you put your main code in
a main function and call it at the end of the program.
... other functions ...