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

Even Rust?


Nim gives you like 85% of the performance of Rust without having to worry about a borrow checker. It also solves concurrency problems via its use of Channels, like Go.

So it's just hard to justify using Rust, for me. Unless you're writing a DB or something where a GC is a no go. But Nim's memory management seems pretty good, and many things are stack allocated.


Even though Nim by default works with a GC to manage memory, I regularly use Nim to work with direct-memory/raw-pointers and can still have increased memory safety by using HOOKS and ARC. I have written about my experience here[1], in case somebody is curious.

1. https://ramanlabs.in/static/blog/raw_memory_management_patte...


Its nice being able to go all the way from fully GC reliant cyclic data-types with closures all the way to memory control-freak every byte and microsecond matters by using stack objects and 'var' parameters. Often you can keep 90% of the code and just tweak a few slow points.


And for the stuff that matters, it is usually possible to tinker around enough to get it pretty much as good as Rust or C++.




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: