DEV Community

Discussion on: Rust's Vector

Collapse
 
berkus profile image
Berkus Decker

Yet, I believe it's interesting to mention it, as no other language I know about provides this kind of hook.

Nope, look in C++ std::vector.

Collapse
 
cthutu profile image
Matt Davies

All of C++'s standard collections have the allocator hook.

Collapse
 
berkus profile image
Berkus Decker

Yeah, I know. The post was about the vector though.

Thread Thread
 
cthutu profile image
Matt Davies

Yes, and the vector, being a collection, has that allocator hook in C++ too.

Collapse
 
nfrankel profile image
Nicolas Frankel

I nope your nope. I don't know C++ πŸ€·β€β™‚οΈ

Collapse
 
cthutu profile image
Matt Davies

"as no other language I know about provides this kind of hook"

But now you do know that C++ provides this kind of hook :)

Collapse
 
berkus profile image
Berkus Decker

I dont think thats a very professional way to approach it though.

If you don’t know something - you learn, do fact checking and only then try to educate others.