May 2019
Beginner to intermediate
466 pages
10h 44m
English
Modules group together related functions, variables, and other definitions. But, they are not just organizational units—they are language constructs that can be understood as variable workspaces. They allow us to define variables and functions without worrying about name conflicts. Julia's Module is one of the cornerstones of the language—a key structural and logical entity that helps make code easier to develop, understand, and maintain. We'll make good use of modules by architecting our game around them.
A module is defined using the module <<name>>...end construct:
module MyModule # code here end
Let's start a new REPL session and look at a few examples.
Say we want to write a function that retrieves a random ...
Read now
Unlock full access