Custom Functions in Module or Single File?

I’ve been coding on Octave to make my engineering work. I’m just knowing how to work with julia because I’ve noticed it has a lot of features to expand the code beyond Octave.

In Octave, I wrote a lot of function stored by files. I’ve seen in Julia there is a Module feature to make that list that works as a “custome package”.

What is the best procedure to store custom function in a proyect? Module, File, Other?

Thank you

I reccomend that you start making packages for almost any code you expect to use on more than one day. Among other things this makes it simple to use Revise.jl to edit things without restarting Julia.

I think that in Matlab functions had to live in their own files, and all are always available, maybe Octave is the same. In Julia you must explicitly load what packages you need, but within any package, whether you put everything in one text file or many is purely for your convenience.

1 Like