Welcome to Koffect!
A research language focusing on the applications of context-oriented/context-aware programming to general purpose programming. From applications of contextual rigor (such as mathematical proof writing), to resource management (such as opening and closing files/connections/sockets), to domain specific languages, programming contains a lot of implicit contexts and mental context management. This project aims to create a language around the concept of explicit contexts to reduce the mental gymnastics and boilerplate needed to maintain context dependent code.
The goal of this language is to research and implement a general purpose programming language specializing in context-oriented programming.
Some areas of focus that this project hopes to tackle are:
- The application of context-oriented programming to tackle metaprogramming challenges
- The application of context-oriented programming to ensure code correctness, through the modelling of context dependent fields such as mathematical correctness or asynchronous code
- The application of context-oriented programming to model real world contextual dependent situations in code with minimal boilerplate
- The application of context-oriented programming to the creation and modelling of domain specific languages
TODO: Gradle scripts not finalized
TODO: Gradle scripts not finalized
TODO: Finalization of language in progress
TODO: Finalization of language in progress
- Effects Bibliography
- Collection of relative literature applying to algebraic effects (and coeffects by proxy)
- Koka
- Language implementing algebraic effect handlers with lexical effect tracking
- Eff
- Language implementing algebraic effect handlers working on general first-class computational effects
- Effekt
- Language implementing algebraic effect handlers with effect safety and effect polymorphism following Scala syntax
- Coeffect
- Language implementing algebraic coeffects through implicit parameters
- OCaml Multicore
- Ocaml 5.0 Multicore added unchecked effect handlers for concurrent programming
- Kotlin Context Receivers
- Kotlin 1.6.20 added experimental support for functions with multiple receivers, also coined as context receivers
- Kotlin updated the design proposal to Context Parameters
- Scala contextual/implicit parameters
- Scala 2 has contextual/implicit parameters which were later refined in Scala 3 to use the
using
/given
syntax
- Scala 2 has contextual/implicit parameters which were later refined in Scala 3 to use the
- Haskell implicit parameters
- Haskell implements implicit parameters as part of type system leading to full type system security with implicit parameters
- Python Context Managers
- Python implements context handlers with the
__enter__
and__exit__
methods to model runtime defined contexts
- Python implements context handlers with the
- Ruby Refinements
- Ruby implements lexical monkey patching (introduction of a context into a scope) with refinements
- Javascript Explicit Resource Management
- Javascript TC39 proposal (currently) in stage 3 of adding resource managers using the
using
keyword andSymbol.dispose
method
- Javascript TC39 proposal (currently) in stage 3 of adding resource managers using the
- C#
using
andIDisposable
- C# resource management through the use of the
IDisposable
interface andusing
keyword
- C# resource management through the use of the
- Java try-with-resource and
AutoCloseable
- Java resource management through the use of the
Closeable
andAutoCloseable
interfaces with thetry
keyword
- Java resource management through the use of the