What is a function?
Object-oriented programming (OOP) looks very natural to most developers as it simulates a real-life situation of classes or, in other words, blueprints and their instances. However, it brings a lot of complexities and problems such as instance and memory management, complex multithreading, and concurrency programming.
Before OOP became mainstream, we were used to developing in procedural languages. In the C programming language, we did not have objects and classes, and we would use structs and function pointers. FP relies mostly on functions, just as procedural languages relied on procedures. We can develop very powerful programs in C without classes; in fact, most operating systems are developed in C. There are other multipurpose programming languages, such as Go by Google. This is not object-oriented and is getting very popular because of its performance and simplicity.
So, are we going to be able to write very complex applications without classes in Swift? We might wonder...