by Ygg2 · 3y ago · 0 comments
> Most devs new to Rust do not understand &str and String and 99% of the content about is how implementation details
Looking at doc like this:
https://doc.rust-lang.org/rust-by-example/std/str.html
https://stackoverflow.com/questions/24158114/what-are-the-di...
Which part didn't convey the info you wanted? How would you convey it?
Curse of Knowledge is real, so to me it looks trivial, but I started Rust before str/String were a thing. I don't know what it's like to start learning Rust.
> I want to have a function that returns the UTC now as a string. Now what? Opening a question on SO -> question closed, here is a question about &str and String that has nothing to do with the use case.
That's on Stack Overflow overzealous moderation. If I had a dollar for every question of mine that was closed with mark as duplicate, I'd be a richer man. Doesn't mean it was specifically Rust community.
Did you consider Rust Discord? I asked few very technical questions and I got some really good answers.
I agree. I usually teach with example. Sort of here is a situation, this is your input now write something (a function, sql statement, etc.) to produce the desired outcome. While doing so I explain all the relevant details (this might be a good time to talk about different allocations for example).
This works surprisingly well. If you reverse the order (talk about different allocations first) the student need to connect the dots later.
I found my approach working better.
Anyways, it might be only me.
>> Did you consider Rust Discord?
I will try that.