Hacker News new | ask | show | jobs
by masklinn 1644 days ago
Erlang does have some mutability (the process dictionary, and the mailbox), but the fact that the language is largely immutable is leveraged by the GC: if I remember correctly the private heap GC is a generational semi-space copying GC, but because the language is immutable it doesn’t need to have write barriers, to perform a minor collection only a scan of the stack(and process dict) is necessary to know the valid roots of the young heap.