erlang: Feels like Prolog with actors
Erlang has some similar surface syntax to Prolog:
Variable,atom- Pattern matching for function definitions:
;for different patterns,for sequences.for end of statement
Erlang does pattern matching (including unification) on function definition clauses:
fac(0) => 1;
fac(N) => N * fac(N-1).
Actor model:
- Every
Processhas amailbox, addressed by it'sPidPid ! Msgto send a message (returns immediately)- Messages arrive in mailbox in order
receivefunction call to process the entiremailbox, looking for a pattern match- Messages can be processed in any order
- Each call to
receivecan selectively match on any message, each matched is removed, others remain on queue
Published on: 01 May 2026