Skip to main content

What is the programming paradigm when I just use functions in a file to organize my program? [Resolved]

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?


Question Credit: Teodoro Mendes
Question Reference
Asked June 12, 2019
Posted Under: Programming
50 views
1 Answers

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


credit: Robert Harvey
Answered June 12, 2019
Your Answer