4 ms·
>However, this is true with garbage collected languages as well. In theory - in practice trying to avoid GC in managed languages is like putting on a straightj
by moonchrome 11y ago
>However, this is true with garbage collected languages as well.
In theory - in practice trying to avoid GC in managed languages is like putting on a straightjacket, eg. JVM doesn't even have value types, and higher level languages - just forget about it :D
The closest I realistically got to this is C# and even then there are all sort of caveats because even if your code doesn't allocate it's a standard pattern to not care about allocation and stuff allocates all over the place and there are no tools to figure out what allocates and what doesn't from code so you just have to assume everything does unless you wrote it or read/profiled it.
- pjmlp 11y agoOberon, Oberon-2, Component Pascal, Modula-3, D, Eiffel all provide C++ like value types. Arrays, records, objects can be stored on the global segment, stack or heap. So they stress the GC as much as new/malloc stress the C/C++ memory manager.