Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 742
Ezequiel Barbosa Avatar asked Oct 14 '25 09:10

Ezequiel Barbosa


1 Answers

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:

  • ContextJ and JCop for Java
  • Context Erlang for Erlang
  • ContextL for Common Lisp (the first COP extension to a programming language)
  • SubjectiveC for Objective C
  • ContextS for Smalltalk
  • PyContext for Python
  • ContextR for Ruby
  • ContextJS for Javascript

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).

like image 104
manlio Avatar answered Oct 17 '25 11:10

manlio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!