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

> Memory management is a distraction: Actually, no. I don’t use that many lexical lifetimes and use instead smart pointers. So yes, I have to understand the differences between a Box, an Rc and an Arc, but my productivity is not impacted compared to Node.JS or Go.

By throwing everything on the heap, I doubt you see much improvement performance-wise over Node or Go. You probably even come out behind idiomatic Go which makes good use of the stack. What's the point?



Eeeh, I run a few web services on a Rust stack and follow a similar pattern. Performance still tops a comparable Node/Python setup; I unfortunately am not a Go user beyond dabbling so can't comment there, but I suppose I'm just weighing in to say "I've not hit issues with this".

Often times, I Box something and tag it with a "review this" for later. If it somehow becomes a bottleneck, well, it's relatively simple to solve in most web-framework use-cases. Haven't really needed Rc, only needed Arc for shared data structures (rare).


It may also come down to what else the web service needs to do.

If you're just doing a CRUD app, you're probably right.

But if you're wrapping some complex logic that itself makes sense to writ in Rust, then I can see why you might want to write the web interface to it in Rust as well.




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

Search: