Composite types

A composition type is a collection of named fields, grouped together and treated as a single entity; these are termed records and structures in some programming languages.

If the type can also have functions (methods) associated with them the resulting collection is termed an object and the languages which support them (Java, C++, Python, Ruby, and so on) as object-oriented.

In Julia, functions are not bundled up with the data structures they operate on. The choice of the method a function uses is termed dispatch. When the types of ALL of a function's arguments are considered when determining the method employed, this is termed multiple dispatch and Julia uses this rather than the single dispatch we associated with object methods. ...

Get Mastering Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.