r/ComputerCraft • u/flauntin • Dec 12 '16
Nested programs or functions?
I'm writing a utility program that will give me about 20 different functions that the computer can perform all red stone related.
Each function is relatively small, is it better to split them into seperate programs to be called on or have a small api of functions that the main program can use.
Also i need the program to persist after restarts etc so what is the best way to do this.
2
Upvotes
1
u/revereddesecration Dec 12 '16
This.
There are no good ways to do this. There are some bad ways that involve serialising the state of the program into a file but this can fail.