OOP Flashcards
What is Julia designed to be?
An object-oriented programming (OOP) language
Procedural vs OOP?
Procedural: writing list of instructions that tell the computer what to do
OOP: emphasizes objects and their relationships with each other using operators
Examples of OOP languages other than Julia?
Python, Java, C++
What is an object?
an abstract concept representing an entity on which computation is performed
objects have attributes and behaviors
How does the type of an object affect its computation?
The type affects memory storage requirements and what can be done computationally.
How can the type of an object be obtained?
The creation of an object requires declaration of its type.
Julia can assign type dynamically. The type can be obtained using the function “typeof()”
How can we access the memory location of a Julian object?
the built-in function pointer_from_objref(x) where x is the reference to the object
How can be find the size of memory in bytes in Julia?
sizeof(x) where x is the reference to the object