Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you're using the stack, by definition you're not using GC, so this cannot be an argument in favor of GC.


Im not arguing in favor of GC. The argument was that a GC takes away memory control, but memory control is up to the language.

Go doesn't restrict you to stack/heap allocation. You can create structs which embeds other structs. This simplifies the job the GC has to do, even if you don't allocate on the stack.

You can do something similar with Struct types in C#.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: