Reader small image

You're reading from  Hands-On Design Patterns and Best Practices with Julia

Product typeBook
Published inJan 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781838648817
Edition1st Edition
Languages
Right arrow
Author (1)
Tom Kwong
Tom Kwong
author image
Tom Kwong

Tom Kwong, CFA, is an experienced software engineer with over 25 years of industry programming experience. He has spent the majority of his career in the financial services industry. His expertise includes software architecture, design, and the development of trading/risk systems. Since 2017, he has uncovered the Julia language and has worked on several open source packages, including SASLib.jl. He currently works at Western Asset Management Company, a prestige asset management company that specializes in fixed income investment services. He holds an MS degree in computer science from the University of California, Santa Barbara (from 1993), and he holds the Chartered Financial Analyst designation since 2009.
Read more about Tom Kwong

Right arrow

Chapter 2

How do we create a new namespace?

A namespace is created using a module block. Typically, a module is defined as part of a Julia package.

How do we expose the functions of a module to the outside world?

Functions and other objects defined within a module can be exposed using an export statement.

How do we reference the proper function when the same function name is exported from different packages?

We can just prefix the function name with the package name. As an alternative, we can use a using statement for one package, and an import statement for the other, so that we can use the function name directly for the first package but use the prefix syntax for the other.

When do we separate code into multiple modules?

It is time to consider separating code into modules when the code becomes too big and too difficult to manage. We expect some refactoring to ensure the...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Design Patterns and Best Practices with Julia
Published in: Jan 2020Publisher: PacktISBN-13: 9781838648817

Author (1)

author image
Tom Kwong

Tom Kwong, CFA, is an experienced software engineer with over 25 years of industry programming experience. He has spent the majority of his career in the financial services industry. His expertise includes software architecture, design, and the development of trading/risk systems. Since 2017, he has uncovered the Julia language and has worked on several open source packages, including SASLib.jl. He currently works at Western Asset Management Company, a prestige asset management company that specializes in fixed income investment services. He holds an MS degree in computer science from the University of California, Santa Barbara (from 1993), and he holds the Chartered Financial Analyst designation since 2009.
Read more about Tom Kwong