Hacker News new | ask | show | jobs
by bryanlarsen 1375 days ago
Just start coding while avoiding lifetimes is great advice, but that's easier said than done. Rust makes some hard things simple and exposes hidden complexity in things you thought were simple.

Maybe I'd reframe it as "just start writing code, and use RC<> liberally to avoid lifetimes until you get a handle on them."

Also avoid async for that first project too.

2 comments

Yes - that's also good advice (using Arc/RC to liberally avoid ownership issues). I've personally had good experiences with async, but I can also see how that could be challenging depending on the background you are coming from.
This is what I did. Still haven't figured out lifetimes or async, but I was impressed with how easily I managed to write something that works[1]...

[1] https://github.com/jcuenod/clickhouse-set-cover