Julia Notes
Contents
Julia Notes¶
Overview¶
I have created a seperate repository julia-notes where I will be documenting my exploration of the Julia language.
I will use this directory as a link and overview, with some special language features highlighted, and recipes included.
As always, this repository is a work in progress.
Table of Contents¶
Working notes¶
Abstract typing in Julia is not a specification of data structure, and can indeed be field-less. Abstract types model behaviour for a set hierarchy.
Project Templating¶
For example, with PkgTemplate for creating the directory structure for a package:
using Pkg
Pkg.add("PkgTemplates")
using PkgTemplates
template = Template(; user="fjebaker")
And generate the project structure with
generate(template, "ProjectName")
Which will generate a new project in ~/.julia/dev/, but can be changed with the dir keyword in Template.
On using vs import vs include¶
In general, using when you are using the functionality, and import when you are intending to extend. include is different, in the sense of a C-like directive, which will “copy” the source code into the module, and becomes accessible as an extension; i.e.
module Something
using ModuleIwillUse
import ModuleIwillExtend
include("SubModuleIwantToExpose.jl")
end