3 ms·
Interesting and well written, as always. I might be missing something, but I think that one approach that hasn't been discussed is reference counting. The expla
by Zababa 4y ago
Interesting and well written, as always. I might be missing something, but I think that one approach that hasn't been discussed is reference counting. The explanation for why garbage collection is:
> Garbage collection magically stops your code (sometimes at predictable points, but it’s generally not very explicit), which is not very transparent and is definitely off the table for use-cases like kernels, video games, real-time applications, and so on. The behavior of a Hare program should be easy to predict, and a garbage collector interferes with that goal. Thus, despite the fact that a garbage collector would improve safety and ease-of-use, it’s not a good fit for Hare.
From what I understand, reference counting doesn't stop the code. However, it might not meet the goal of "Transparency and explicitness in code". Maybe it's too much for kernels, video games, real-time applications too.
- ddevault 4y agoReference counting is still pretty high level, given that you have to find somewhere to put the count. It's not really suitable for kernels or some embedded applications, for instance. That makes it less desirable as a language feature. However, you can definitely implement reference counting in your own programs and libraries.
- Zababa 4y agoThank you for the explanation, that makes sense.