4 ms·
It seems to have some memory safety features: https://www.beeflang.org/docs/language-guide/safety/ https://www.beeflang.org/docs/language-guide/safety/ > Leak
by rob74 7y ago
It seems to have some memory safety features:
https://www.beeflang.org/docs/language-guide/safety/ https://www.beeflang.org/docs/language-guide/safety/
> Leaks can be detected in realtime with the debug memory manager. Reachable memory will be continuously traced at runtime and memory which is no longer reachable but has not been properly freed will be immediately reported as a leak...
Sounds like it doesn't have a Garbage Collector, but a "Garbage Detector" that's only active for debug builds?
- vmchale 7y agoThat's still not the same as affine/linear types, which other languages offer. Also, testing helps detect bugs, but cannot guarantee security.
- beefdev 7y agoYes, this is right - there is what is essentially a fully-functional "garbage collector" but its only job is to detect leaks in debug builds. Well, it also is used for detecting illegal memory layout changes during hot code changes... One may say "then why not just make the GC optional like D", but when you design a library you really need to either design it for a GC or for manual memory management. Even for the basic string type - if Beef was a GC'd language then String would be immutable, but it's not so String is mutable. Totally different designs.