[SWIFT] About Class and Instance

Class is like a blueprint. The necessary information (functions, etc.) is described there. The important thing here is not to use the class itself (directly in the code).

An instance of a class is an instance of the above class initialized by the "init function". (Another class) By writing (), you can access the (actual) class from that instance. And you can use the functions in the class. The instance is what you actually use in your code.

If you compare a class to something other than a blueprint, you can say that it is a "cookie-making type." What you actually eat is not the "mold" but the "cookie itself" This "cookie itself" can be expressed as an instance. Also, although there is only one type of cookie, the act of making many "cookies" using it is also possible. The same is true. If necessary, use "cookies" made from molds to "eat," "decorate," and "gift to someone you like."

Recommended Posts

About Class and Instance
Python: Class and instance variables
Python class variables and instance variables
About _ and __
Use instance method and class method properly
Python class definitions and instance handling
[Python] class, instance
About python, class
Python class, instance
Talking about Python class attributes and metaclasses
About cumprod and cummax
Metaclass and is instance
Class methods and static methods
About cross-validation and F-number
This and that about pd.DataFrame
Various class methods and static methods
Linux (about files and directories)
About python objects and classes
About Python variables and objects
About LINUX files and processes
Globalization of class instance variables
About Raid group and LUN
About fork () function and execve () function
About Django's deconstruct and deconstructible
About Python, len () and randint ()
About Python datetime and timezone
About Sharpe Ratio and Sortino Ratio
About Python and regular expressions
Class inheritance and super functions
About Python and os operations
About http.Handle () and http.NewServeMux (). Handle ()
Python # About reference and copy
About Numpy array and asarray
About Python sort () and reverse ()
Reference order of class variables and instance variables in "self. Class variables" in Python
I'll inherit and override the class
About installing Pwntools and Python2 series
perl objects and python class part 2.
Summary and common errors about cron
About python dict and sorted functions
About dtypes in Python and Cython
About MkDocs themes and their customs
class
About Python pickle (cPickle) and marshal
[Python] About Executor and Future classes
About Python, from and import, as
Calculation of homebrew class and existing class
About time series data and overfitting
perl objects and python class part 1.
I was addicted to confusing class variables and instance variables in Python
class
I thought a Python class variable was an instance variable and died
Python classes and instances, instance methods
About package management with conda and pip
Example of using class variables and class methods
Memorandum about regression and binary classification metrics
About sensor_mode and angle of view of picamera
Bind to class to read and write YAML
AWS EC2 instance launch and ssh connection
About errors during PyInstaller installation and execution
Python basic operation 3rd: Object-oriented and class