
On 26.05.24 23:57, Mikulas Patocka wrote:
Hi
I'd like to announce the release of Ajla - a new purely functional programming language that looks like traditional procedural languages.
If you are interested, see https://www.ajla-lang.cz/
Just one thing that caught my eye:
Ajla has efficient mutable arrays - if an array's reference count is one, the array is modified in place. If not, a copy of the array is created and modified.
That design decision restricts you to reference-counting garbage collectors. These have multiple problems and restrictions, such as: - Inability to deal with reference cycles. - Assigning to a reference means TWO additional write operations to keep the reference counts up-to-date; this means your programmers will try to minimize allocation, which tends to restrict the design space so the code gets worse. - Reference counting is less efficient than copying collectors for most cases. - Being restricted to one GC algorithm means the language cannot improve on that front, the GC approach is baked into the language semantics and cannot be changed if it turns out it was an unlucky choice. I'd recommend doing something like the borrowing semantics in Rust, or uniqueness typing of Clean: Some language mechanism that makes sure that all mutable data is only accessible through a single reference at any one time. This will also allow compilers to aggressively optimize, since if a language enforces a one-reference-to-mutables-only, there can be no aliasing, and that's a huge win as any even merely potential aliasing prevents a whole host of important optimizations. Just my 2c :-) Regards, Jo