Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It seems to have some memory safety features:

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?



Yes, 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.


That's still not the same as affine/linear types, which other languages offer.

Also, testing helps detect bugs, but cannot guarantee security.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: