-
Notifications
You must be signed in to change notification settings - Fork 26
Home
Partha Susarla edited this page Mar 20, 2017
·
7 revisions
Welcome to the Cogent wiki!
Cogent is a restricted, polymorphic, higher-order and purely functional language with linear types and without the need for a trusted runtime or garbage collector.
In the context of Cogent, the adjectives above, mean the following:
- restricted: Cogent omits certain features that one might come to expect from a programming language. For instance, Cogent doesn’t support general recursion.
- polymorphic: This is similar to templates in C++ or generics in Rust.
- higher-order: Cogent uses software components like functions, modules or objects as values.
- purely functional: Cogent forbids changing state, mutable data. Evaluation is done similar to a mathematical function.
- linear types: ‘Objects'(Here object is used to very broadly define instances/variable of a particular type) can be used exactly once.
- trusted runtime: Cogent compiler generates C code, so the trusted component is limited to the C runtime system.
- garbage collector: Since Cogent compiler generates C code, we would manage memory manually, like we do in any C program.