very newbie question here. Say I have a project in “Project” folder, with a couple of “.jl” files that are considered the main program(s). Now, I’d like to write some functions that will be called by the main program (perhaps all the main programs or only one). What’s my options?
1- create a new module “myModule” and put it into .julia/v0.5/myModule
2- Write the function directly into the main program
3- Create a new file “myFunction.jl” in “Project” folder and add “include(“myFunction.jl”)” at the beginning of the new program?
4 - ?
What’s the good way of doing it?
Right now, I know that option #1 might be the “best”, but I find it perhaps too much work for simple or little functions. I don’t like option #2, because I always thought that the main program was harder to read like that (though it might be more portable between colleagues… ?).
Option #3 is what I always did in Matlab.
Perhaps it’s a combination of these answer? I mean, I can begin by addind the functions to the main program and if the function grows or become more generic I should transfer it to a module when this time comes?
Other option? Sorry if it’s supposed to be easy, I’m not considered a developer with regards to developing code.