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

GC does force you into a memory layout for your objects that negates any advantage in the allocation routines proper.


I'm guessing you're referring to the fact that the most popular GC languages allocate almost every object on the heap, even when used as a field of another object. This is by no means a constraint of the GC, it is a separate design choice.

And in fact C# has always supported "value objects", which do get allocated in-place, Java is adding the same support probably in the next release, and Go actually defaults to it.


No it doesn't. GCs need to be able to traverse objects. They don't impose object layout constraints.


Only if speaking about languages without system programing capabilities alongside their GC features.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: