| Rationale | Convention | Contributing | TODO |
Note: some features doesn't have a name, I have to coin it out. That said, please make a PR if you find better term for them.
-
Caching: Caching with Reactive Invalidation
-
Calculus: Dot Calculus, Lambda Calculus, Symmetric Interaction Calculus, Term Rewriting, Turing Machine
-
Code Generation: Hygienic Macro, Lisp Macro, Reader Macro
-
Dependency: Fragment Based Code Distribution
-
Design Pattern: Async/await, Continuation Passing, Message Passing, Trait
-
Pattern Matching: Active Pattern, Pattern matching, View Pattern
-
Evaluation: Compile-time Code Evaluation, Lazy Evaluation
-
First Class: First Class Date, First Class Module, First Class Regex, First Class Type
-
Memory Management: Garbage Collection, Ownership, Reference Counting, Memory Safety
-
Mutitasking: Async/await, Coroutine, Green Thread, Symmetric Interaction Calculus, Free Parallelism
-
Paradigm: Functional Programming, Logic Programming
-
Polymorphism: Row Polymorphism
-
Property: Referential Transparency
-
Syntax Sugar: Automatic Broadcast Implementation, Chained Try, For Comprehension, Generalized Update Syntax, Universal Function Call Syntax
-
Type: Algebraic Data Type, Capability Safety, Class Invariant, Dependent Type, Effect System, Generalized Algebraic Data Type, Gradual Typing, Linear Type, Nil Fallthrough, Reference Capabilities
- Description: A syntax sugar for writing asynchronous concurrent code that looks serial.
- Implementation: JavaScript async-await
- Videos: Fireship: The Async Await Episode I Promised
- Description: Given a definition
f: a -> b
and a functorM
,f: M a -> M b
is implemented automatically. - Implementation: Chapel, Matlab array and matrix semantic (partial)
- Articles: Hillel Wayne - Microfeatures I'd like to see in more languages
- Description: Caching the result of function, invalidating the data reactively when the cache are potentially outdated.
- Implementation: Skip Caching with reactive invalidation
- Description: A property that functions cannot access data besides that reachable via their closure, their inputs, and global constants. Generally implied by referential transparency, and incompatible with mutable global variables.
- Implementations: Pony, Monte, Wyvern
- Description: A generalization of optional chaining in JavaScript. A language construct that accepts a series of blocks where each block will be executed only if the previous blocks yield an error.
- Example Usage:
try {
assert user_exists(name)
current_user = get_user(name)
assert user_not_banned(current_user)
do_lots_of_stuff_with(current_user)
} {
deny_login_of_user(name)
}
// Replacing if-and-bind, like Python's walrus operator:
try {
match = regex.search("\d+(\d)", text)
assert match
process_numbers(match[0])
} {
match = regex.search("\w+(\d)", text)
assert match
process_letters(match[0])
} {
print("No match.")
}
// Replacing complicated conditions that would otherwise be in a single line.
try {
assert user.age > 18 and user.has_feature_enabled
assert user.has_billing_account and user.get_credits() > 0
assert user.get_last_payment().age_in_days < 90
process_as_premium_user()
} {
process_as_normal_user()
}
// Replacing nested catch blocks:
try {
response = fetch_from_network(resource_id)
assert response.network_success
value = response.value
} {
assert resource_id in offline_cache
value = offline_cache[resource_id]
} {
print("Failed to get resource. Use manual value?")
response = user_input("Resource override: ")
assert not response.cancelled
value = response.value
} {
raise Error('Network not available and ID {resource_id} not in offline cache.')
}
print(value)
- Constraints of specific types that gets ran across function calls to ensure the data is in correct shape.
- Implementation Ada type invariant
- Articles: Riccardo Bernardini - Reasons for loving Ada: Type invariants (because bugs shouldn't sleep...)
- Description: Evaluation of code at compile time.
- Implementation: Zig comptime, Konna 2LTT
- Description: a pattern in which the state of an executing program may be captured and passing around, resume on demand.
- Implementation: Scheme continuation
- Description: A syntax sugar for structuring cooperative concurrent code modularly.
- Implementation: Lua coroutine
- Articles:
- Articles: Essense of Scala
- Description: A system similar to type system, but tracks side effects instead of type of the value.
- Implementation: Koka effect system
- Articles: Stephen Diehl - Exotic Programming Ideas: Part 3 (Effect Systems)
- Implementation: Frink Date/Time Handling
- Description: Modules are treated as structs
- Implementation: 1ML, Zig, Ocaml First class module
- Articles: Stackoverflow - What (exactly) are "First Class" modules?
- Description: A compiler infrastructure that identify codes fragment by its hash.
- Implementaion: Haskell fragnix, Unison hash identified AST
- Articles: Big Technical Idea on Unison
- Description: Parallelism is imposed implicitly by the langauge runtime.
- Implementation: Futhark, HVM
- Description: A series of techiques that helps proving the behavior of the program
- Implementation: Coq proof assitant
- Description: A system that free unused heap-allocated memory in runtime
- Implementation: Common Lisp
- Description: for any binary operator function
f : a -> a -> a
, we can rewritea = f a b
asa f= b
- Implementation: Noulith generalized update syntax
- Articles:
- Description: A type system that checks some expresions/variables at compile time while leaving others to the runtime type checker.
- Implementation: Typescript
- Articles:
- Description: An abstraction that allow easily writing preemptive concurrent code, without actually using OS thread
- Implementation: Java green thread
- Description: Lisp macros that follows lexical scope.
- Implementation: Scheme Hygienic macro
- Implementation: pLam
- Description: Any portion of the code is evaluated only when needed.
- Implementation: Haskell lazy evaluation
- Description: Compile-time AST-based code generation in a homoiconic and dynamically-typed language.
- Implementation: Common Lisp macros
- Implementation: Prolog
- Implementation: Erlang concurrent programming, Smalltalk
- Description: A generalization of optional chaining in JavaScript, where any operation on nil will always yield nil.
- Articles:
- Description: See Capability safety
- Description: A system that helps compiler decide when to free heap-allocated memory statically by annotating the ownership of heap allocated variables to entities in the program.
- Implementation: Rust ownership
- Description: A structural way for obtain data from complicated data structures.
- Implementation: Haskell pattern matching
- Description: Macro system that gets called by the reader, before AST is formed.
- Implementation: Common Lisp, Elixir Sigils (this is a weaker alternative to reader macro) )
- Description: A type system feature in which each reference carries a modifier to the capabilites, which can describe whether reading or writing is allowed, and whether these features are isolated to this reference.
- Impelementation: Pony
- Description: A property for a function where: 1. returns the same for identical arguments; 2. has no other side effects.
- Description: A polymorphism that dispatch on concerned record fields and their type.
- Implementation: OCaml row polymorphism
- Articles:
- Paper: Objective ML: An effective object-oriented extension to ML
- Description: A calculus similar to Lambda Calculus, that can be implement concurrently due to its support for projection and duplication.
- Implementation: HVM
- Articles:
- Papers:
- Implementation: Mathematica
- Description: An interface that allows writing type safe code on different types.
- Implementation: Haskell typeclass, Rust trait
- Description: A syntax sugar for function call that makes chaining function calls easy.
- Implementation: D UFCS, Elixir pipe operator, Clojure threading macro