programming-languagesparadigms

Are there any context-oriented programming language, and what's their use for?


I heard someone talking about Context-Oriented Programming, so I googled it to found out what that means, and it seems like a new paradigm of programming, but also all I found are academic papers talking about the concept.

So I would like to know if there's any language that implements context-orientation and what is this good for?


Solution

  • COP is a programming paradigm supporting software adaptation to the execution context.

    It's an alternative to the use of hard-coded conditional statements spread over the application to encode context-dependent behavior.

    In the years several COP extensions to various languages have been proposed:

    and probably many others.

    Each concrete language design and implementation comes with different variations of the features of the COP paradigm. For further details you can see A Comparison of Context-oriented Programming Languages (Malte Appeltauer, Robert Hirschfeld, Michael Haupt, Jens Lincke, Michael Perscheid - 2010).

    Also a good introduction / starting point is Context-oriented Programming (Robert Hirschfeld, Pascal Costanza, Oscar Nierstrasz) or Context-Oriented Programming: A Programming Paradigm for Autonomic Systems (Guido Salvaneschi, Carlo Ghezzi, Matteo Pradella - 2013).