Hacker Newsnew | past | comments | ask | show | jobs | submit | mre's commentslogin

I recommend reading Steve's article for context: https://steveklabnik.com/writing/arguing-about-arguments/

Author here. I use the term 'genuinely' too often, but that's just me. I do that when speaking here as well. Suffice to say that I'm not a native speaker, so that might have something to do with it. I will go over the text and replace some of those. thx.


My own iA Writer flags are great, love, hope, literally, "but,", and genuinely. Sigh. They just sneak out there.


We use httpmock [1] for lychee, and it works quite well. Haven't looked too closely at the differences yet.

[1] https://docs.rs/httpmock/latest/httpmock/


As I see httpmock is meant only for rust unit tests. In my case unit test library is a side effect. Apate main goal is to be a stand alone server. For example you are building web app that interacts with backend which is not ready yet. So you can simulate some API from this backend locally.



As a counterpoint, I quite enjoyed the writing style. Not everything has to be summarized. To me, it was more about the human experience.


My vote goes to .ws which redirects to a beer brand.


Recently watched Mickey 17 and it reminded me a bit of Idiocracy. Maybe someone is looking for related movies.


Fair point. Your wording was a bit strong, but I assume you meant well. I will update the article.


Author here; thanks! I had the same impression, which is why I started writing these short-form articles about idiomatic Rust. The blog post overview is here: https://corrode.dev/blog/


The thing is, once you internalized the concepts (ownership, borrowing, lifetimes), it's very hard to remember what made it difficult in the first place. It's "curse of knowledge" in some sense.

What's changed since 2015 is that we ironed out some of the wrinkles in the language (non-lexical lifetimes, async) but the fundamental mental model shift required to think in terms of ownership is still a hurdle that trips up newcomers.


100%. Newcomers still struggle a bit, especially if they've never used C/C++ before.

A good way to get people comfortable with the semantics of the language before the borrow checker is to encourage them to clone() strings and structs for a bit, even if the resulting code is not performant.

Once they dip their toes into threading and async, Arc<Lock<T>> is their friend, and interior mutability gives them some fun distractions while they absorb the more difficult concepts.


Do you mean `Arc<Mutex<T>>`? Yeah, I agree. Wrote a blog post on that topic as well: https://corrode.dev/blog/prototyping/ The title is a bit of a misnomer, but it's about beginner-friendly escape hatches in the language. Perhaps it's useful to newcomers.


Any lock, but that's generally the best choice.

Great post! It's got a ton of advice for being productive, and it should be especially useful for beginners.


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

Search: