Skip to content

RFC: make __xxx__ names officially reserved #18249

@StefanKarpinski

Description

@StefanKarpinski

We've used the name __init__ as a function name with special meaning in modules (function that is automatically called after a module is loaded but before the module is precompiled) and we may introduce __main__ in the future as a function in Main that is automatically called if it exists when a script run as julia script.jl finishes – the purpose being to allow a hypothetical julia-compile script.jl to produce a binary that behaves in the same manner as if you'd run julia script.jl without any changes to script.jl. In general, this points to the notion that we should officially reserve names of the form __xxx__ as having special meaning to the system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentationspeculativeWhether the change will be implemented is speculative

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions