Skip to content

Instantly share code, notes, and snippets.

@kenchangh
Last active August 29, 2015 14:04
Show Gist options
  • Save kenchangh/1e2e57ec6d5094ab28e3 to your computer and use it in GitHub Desktop.
Save kenchangh/1e2e57ec6d5094ab28e3 to your computer and use it in GitHub Desktop.
Julia's style conventions for variables.

Stylistic Conventions

While Julia imposes few restrictions on valid names, it has become useful to adopt the following conventions:

  • Names of variables are in lower case.
  • Word separation can be indicated by underscores ('_'), but use of underscores is discouraged unless the name would be hard to read otherwise.
  • Names of Types begin with a capital letter and word separation is shown with CamelCase instead of underscores.
  • Names of functions and macros are in lower case, without underscores.
  • Functions that modify their inputs have names that end in !. These functions are sometimes called mutating functions or in-place functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment