Re:Java’s new garbage collector promises low pause times on ...
by stcredzero on Thursday August 30, 2018 @06:22PM
(#17881322)
When Java was created, they wanted to get rid of that complexity, so primitives always go on the stack and objects always go on the heap.*
This was inherited from Smalltalk. Everything was an "object reference," with tag bits and all, but SmallInteger was optimized by using the low 16 bits of the object reference pointer to store the SmallInteger. So you can think of Smalltalk as having SmallInteger as a "primitive" type with pass by value.
This was inherited from Smalltalk. Everything was an "object reference," with tag bits and all, but SmallInteger was optimized by using the low 16 bits of the object reference pointer to store the SmallInteger. So you can think of Smalltalk as having SmallInteger as a "primitive" type with pass by value.