Conversation
Edited 10 months ago

I fucking hate redditors sometimes omg

question: what’s the difference between Box<T> and normal pointers in Rust?

reply: umm actually there’s no such thing as “normal pointers” in Rust and here’s 5 paragraphs about why you’re wrong, none of which answer your original question

3
2
9

@kasdeya the funniest part being that rust definitely has normal pointers, you just need unsafe to interact with them directly rather than via abstract move semantics

0
0
1

@kasdeya

Do you mean references? I think the difference is Box<T> stores T on the heap, but &T could be either, but is usually on the stack.

Tho I am not very confident.

0
0
0