----zvolkov: trying to delete this old question but it won't let me ----
--Note: the question is NOT about programming language paradigms as in OOP vs functional vs. formal logic!--
I'm trying to grok different ways a logic can be expressed in a computer language. The thinking goes along the lines of imperative/declarative but at somewhat finer level of details. Or perhaps I'm mixing domains, then please tell me so.
Please help by suggesting new paradigms and/or providing references to programming environments best suited for each paradigm. I'm particularly interested in the "Goal seeking" category and how it can be implemented in modern programming environments.
Examples of the paradigms I have in mind:
- Sequential execution -- program follows the sequence prescribed in the code (whether written in OOP or procedural style). E.g. a C/C++/C# console program.
- Sequential execution imitating event-driven execution with explicit event loop. E.g. an early Windows API program.
- Interactive / Event-driven -- program reacts to external events pushed to it by the framework / system. No explicit event loop present in source code. Each event handler is a mini-sequential program. E.g. a WinForms GUI application or ASP.NET application.
- Goal seeking. Program (at the source code level!) is a set of tasks and dependencies between them. The environment arranges execution of tasks in the best sequence possible. What would be an example of this?
Examples of the paradigms that I believe are invalid for this exercise:
- Formal logic Program is a set of facts / predicates and ways to query them. E.g. SQL, Prolog, etc. At this point I don't think it's a valid example as you can't write a complete independent program in this style, you must mix it with another paradigm to make it work.
- Continuous optimization / independent agent. The program is one or more Goal Function(s) which it strives to keep at maximum possible value, plus an interface to external world. Not sure if this is a valid example as the internal logic of the agent seemingly has to be written in event-driven style...
Mmm... let's see if this makes sense to anybody out there