Designing Functions and Interfaces

This chapter will continue looking at the fundamental concepts of Julia. The topics that we have chosen here will provide a solid foundation of the key concepts of Julia programming. In particular, we will discuss the core Julia programming techniques that are related to functions and interfaces. Functions are the fundamental building blocks of software. Interfaces are contractual relationships between different components of the software. Effective use of functions and interfaces is a must for building robust applications.

The following topics will be covered in this chapter:

  • Functions
  • Multiple dispatch
  • Parametric methods
  • Interfaces

As part of the learning process, we will go over a use case of game design. More specifically, we will pretend that we are building a space war game that contains a game board with spaceships and asteroid pieces. We will build functions that move the game pieces around and equip the spaceships with weapons to blow things up.

By the end of this chapter, you will have the necessary knowledge to design and develop functions effectively. Through the use of multiple dispatch and parametric methods, your application will become more extendable. Once you have learned these techniques, you should also be able to design a system that contains pluggable components based on interfaces.

I can't wait any longer. Let's get started!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.120.206