<function>
or <operator>
).
This is just notation, and the symbols <
and >
should not be misconstrued as Julia's syntax.
Action | Keyboard Shortcut |
---|---|
Previous Section | Ctrl + 🠘 |
Next Section | Ctrl + 🠚 |
List of Sections | Ctrl + z |
List of Subsections | Ctrl + x |
Close Any Popped Up Window (like this one) | Esc |
Open All Codes and Outputs in a Post | Alt + 🠙 |
Close All Codes and Outputs in a Post | Alt + 🠛 |
Unit | Acronym | Measure in Seconds |
---|---|---|
Seconds | s | 1 |
Milliseconds | ms | 10-3 |
Microseconds | μs | 10-6 |
Nanoseconds | ns | 10-9 |
The upcoming Chapters 3 and 4 cover the core tools of programming: functions, conditional statements, and for-loops. Chapter 3 in particular focuses on functions, which are the backbone of Julia. Their use is tightly connected to achieving high performance. Given their importance, we'll spend a considerable amount of time discussing them.
The presentation of functions is structured into breaking them down into three:
built-in functions (loaded by default),
third-party functions, and
user-defined functions.
The first two are made available in the workspace by loading packages (implicitly or explicitly). This is why the analysis of packages and running functions is tied together in Section 3b, relegating the subject of user-defined functions to Section 3c.
Studying functions also require a crisp understanding of global and local variables. This distinction sets the stage for discussing the view of functions as self-contained mini-programs representing a task. Taking advantage of this, we present both subjects together in Section 3d. This view of functions encourages good practices regarding their use, which will become more apparent as we apply them in subsequent chapters. For now, it's enough if you become familiar with this perspective.
Finally, the concept of broadcasting introduced in Section 3e is key. I recommend mastering this technique, which allows you to apply the same function to each element in a collection. Its use is widespread in the language.