Is there any kind of context-oriented programming language and what is it used for?
I heard someone talking about Context-Oriented Programming, so I searched for it to find out what that means and it looks like a new programming paradigm, but all I found are academic papers talking about the concept ...
So, I would like to know if there is any language that implements contextual orientation and what is it useful for?
source to share
COP is a programming paradigm that supports the adaptation of software to the execution context.
It is an alternative to using hardcoded conditional statements that are distributed throughout the application to encode context-dependent behavior.
Over the years, several COP extensions have been proposed for various languages:
- ContextJ and JCop for Java
- Erlang context for Erlang
- ContextL for Common Lisp (the first COP extension for a programming language)
- SubjectiveC to Objective C
- Context for Smalltalk
- PyContext for Python
- ContextR for Ruby
- ContextJS for Javascript
and possibly many others.
Each specific language design and implementation has different options for the features of the COP paradigm. For more information, you can see Comparison of Context-Oriented Programming Languages (Malte Appeltauer, Robert Hirschfeld, Michael Haupt, Jens Lincke, Michael Perscheid - 2010).
Also a good introductory / starting point is Context-Oriented Programming (Robert Hirschfeld, Pascal Costanza, Oscar Nirstrash) or Context-Oriented Programming: A Programming Paradigm for Autonomous Systems (Guido Salvaneschi, Carlo Ghezzi, Matteo Pradella - 2013).
source to share