Skip to content

Comment on How to Learn Modern Rustparent

Comments

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.

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

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.