Question

I'm programming a telegram bot with Python and, for a number of reasons, there are no classes in the whole project, just several functions correlated to the the file where they are located. E.g., my parse() method is defined inside a parser.py file.

If I'm not structuring the project in terms of classes and objects and states and attributes, then what paradigm is this? None?

Was it helpful?

Solution

The programming paradigm that organizes the software into functions is called procedural programming. For example, C is a procedural programming language. Most dynamic languages like JS or Python can be used in a procedural style.

While you are also organizing your code into separate files, there is no commonly used name that describes this. For example, modular programming is more about encapsulation than about using multiple files.

It is perfectly fine if you aren't writing classes. OOP is nice but is not always a good fit. For many problems, a procedural approach is great.

Further Reading
Procedural programming

Licensed under: CC-BY-SA with attribution
scroll top