Till now we have learnt that the programming paradigms are built out of programming concepts. There are four most important programming concepts involved, these are
- Lexical Scoped Closures
- Named State
A record is a data structure providing a group of references to the data items which are indexed to have access to each item. The identifier in the context refers to the record. The dot operation such as R.com, where R is the identifier will return the reference to the string mentioned.
R=chanson (Name- “Digital Currency”
Examples- “Bitcoin, Ethereum, and Litecoin”)
Every symbolic programming considers the record as its foundation. The language can calculate the records and perform various other functions such as creating new records, decomposing them, and examining them. Also, arrays, lists, trees, strings, and hash tables (data structures) can be derived from records.
Knowledge of Designing A Language and Its Programs will help you.
- Lexically scoped closure-
The concept is at the heart of programming. Programming with closures is functional programming, and it is the central paradigm. If we talk about the implementation part, the external references and closure are combined. But a programmer would see closure as a packet of work. In simple words, it would be a program that is capable of transforming any instructions into a closure at a certain point in time in the program. Along with this, passing the closure and deciding the execution is done. Sometimes, the result of the execution of the closure is similar to as that of the point of the creation of the closure.
There are several types of closures. Some of them are-
- Procedures are closures
- Functions are closures
- Software components are closures
- Objects are closures
- Classes as closures
Specific paradigms also include many abilities, some of them are-
- Genericity and instantiation-
Writing functions that return other functions do and correlate genericity and instantiation associated with object-oriented programming. The class is the first function, and another function is named as an object.
- Separation of concerns-
The writing functions which take other functions as arguments take the separation of concerns. Aspect object-oriented programming associate all these concerns.
- Independence (Concurrency)-
Here, by independence, we mean program construction as independent or separate parts. But it is not an easy task to do. When are the instructions independent? The instructions which are not ordered in time are independent.
Why is needed for the implementation of the concept of independence of instructions?
A new programming concept called concurrency is the answer. Concurrency concept comes into action when two parts do not interact at all. Communication is the well-defined interaction of the concurrent parts. It is just a concept and differs from parallelism as it is a hardware concept. The simultaneous execution of two parts come under parallelism.
On the other hand, when already the order of the execution of two parts is known it is called sequential.
- Named State-
Out of all the prime concepts of programming, another is named state. An abstract notion of time in the program is the concept introduced by state. Whereas, the functional programs are deprived of any kind of notion of time.
The mathematical functions do not change in the programming world, but the things are different in the real world. It is because only a few real-world entities have functions’ timeless behaviour. Modelling this concept inside a program requires a model of an entity with a unique identity. It does not remain stable and changes its behaviour while programming implementation. But to get a timeless behaviour, an abstract notion of time has to be added to the program.
What is an abstract time?
The sequence of values in time with a single name is called an abstract time.
The absence of the modular properties of the named state makes unnamed state.