Guide for good programming style in Julia


#1

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!


#2

Have you read through

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

in the Julia documentation?


#3

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.


#4

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.


#5

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