Skip to content

Variable Declaration

ZacNugent edited this page Jul 29, 2017 · 2 revisions

New variable bindings are introduced at the current namespace level by:

  • Use of the assignment operator =. (Special handling for LHS tuples, chained assignment or const assignment of a parameterised typealias).
  • DataType declarations struct, mutable struct, abstract type, primitive type and their deprecated syntaxes.
  • function and macro declarations.
  • module/baremodule declarations.
  • using, import or importall calls.

New intra-expression bindings are introduced by:

  • Arguments of a function/macro declaration.
  • Parameterisations of a function or DataType declaration using the where syntax.
  • Iterators of a for loop or comprehension/generator.
  • Arguments of a do block.
  • Arguments of a let block.
  • Arguments of an anonymous function.
  • The caught error of a try-catch block.
Clone this wiki locally