Guide for good programming style in Julia

I am looking for a guide that focuses on programming style in Julia. I understand how to write functions, use types, the syntax etc., but I look for a guide that focuses on questions like:

When I start a project with many files, how do I organize them? How should I include functions? How should I make sure that functions can call other functions? How do I organize the input/output of functions efficiently?

It would be a great help, if there was a compact source that answers these kind of questions.

Thank you very much!

4 Likes

Have you read through

https://docs.julialang.org/en/stable/manual/style-guide/

in the Julia documentation?

4 Likes

It is customary to put projects in packages. PkgDev.generate will create a nice skeleton for your source and tests.

For include and module organization, see the documentation.

For “how can I make sure” questions, the answer is usually a unit test.

For examples on big structured packages look at Images.jl, DifferentialEquations.jl, Jump.jl, POMDPs.jl …
It would be good to have a list of the good style choices of those packages.

2 Likes

Personally I think the Documenter.jl package is very well designed, using many different modules:

https://github.com/JuliaDocs/Documenter.jl

1 Like