79801716

Date: 2025-10-27 10:49:20
Score: 2
Natty:
Report link

There is now a macro for this.

https://docs.julialang.org/en/v1/manual/command-line-interface/#The-Main.main-entry-point

# main.jl
function (@main)(args)
    # only runs when `main.jl` is executed like a binary, in other words
    #
    # $ julia main.jl arguments go here
end
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user28464084