diff --git a/doc/EN/faq_syntax.md b/doc/EN/faq_syntax.md index ebbfdee2..b9a06979 100644 --- a/doc/EN/faq_syntax.md +++ b/doc/EN/faq_syntax.md @@ -1,19 +1,5 @@ # Erg design's "Why" and Answers -## Erg memory management model - -Use ownership in CPython backend + Python memory management model (though circular references in Erg code will not be handled by GC [see details](./syntax/18_ownership.md/#circular-references) - -Using ownership + [Perceus](https://www.microsoft.com/en-us/research/uploads/prod/2020/11/perceus-tr-v1.pdf) memory in Erg's own virtual machine (Dyne) Management model, if Erg code uses the Python API then the Erg code uses the tracking garbage collection memory management model - -In LLVM, WASM backend uses ownership + [Perceus](https://www.microsoft.com/en-us/research/uploads/prod/2020/11/perceus-tr-v1.pdf) memory management model - -Regardless of the backend, the difference in memory management will not need any changes to the code - -__Notice__:Erg's motivation for introducing an ownership system is not for "memory management without relying on GC" like Rust. -The aim of Erg's ownership system is ``localization of mutable state''. Erg has a notion of ownership attached to mutable objects. -This is because shared mutable state is prone to bugs and even violates type safety (see [here](./syntax/type/advanced/shared.md#SharedReference)). It's a judgmental decision. - ## Why are the braces around type parameters || instead of <> or []? This is because `<>` and `[]` cause syntax conflicts. @@ -120,4 +106,4 @@ In what cases could it be said that union was wrong? One indicator is "whether t The Erg designers decided that giving special treatment to side effects would make error messages easier to read. Erg has a strong type system, but types don't rule everything. -If you do, you'll end up with the same fate that Java tried to rule everything with classes. \ No newline at end of file +If you do, you'll end up with the same fate that Java tried to rule everything with classes.