How to create nogc code?
Ola Fosheim Grøstad via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jul 11 21:25:33 PDT 2016
On Monday, 11 July 2016 at 21:28:58 UTC, Jonathan M Davis wrote:
> If all you're doing is passing around int* and the like, then
> the situation is the same as in C and is fine. But stuff like
> int[] becomes problematic, because it assumes that you're using
> the GC. But that's stuff that doesn't exist in C++.
It exists in C++, but is broken into multiple separate concepts:
std::string_view, std::vector, gsl::span etc.
D and Go mixes up a view and ownership which is confusing.
More information about the Digitalmars-d-learn
mailing list