"New Rustacean" podcast—Bonus 1: Polyglot Programming Promise and Perils

Hey Chris! Just listened to episode 5. Great stuff as always.

One small nit that's kind of important though: you said something like

Vecs are always heap allocated.

While this is sort of true, there's a distinction here that matters.

let v = vec![1, 2, 3];

Here, there's two kinds of allocations: the Vec struct itself is allocated on the stack, but its data, the three elements, are on the heap. So a very small change is

The data of a Vec is always heap allocated

is a bit more accurate. Does that make sense? I can go into more detail about what exactly and why if it doesn't.

Anyway, great show!

1 Like