Re:The Current State of Java Value Types
by gpderetta on Friday June 22, 2018 @04:59AM
(#17372536)
Doesn't C++ behave in the same way?
Sure, classes are generally designed for either being used as value types or OO Objects, you can prevent objects from being copyied/moved and if you really go out of the way even from being created outside of the heap, but in general the value vs reference semantic is left at point of use in C++.
Sure, classes are generally designed for either being used as value types or OO Objects, you can prevent objects from being copyied/moved and if you really go out of the way even from being created outside of the heap, but in general the value vs reference semantic is left at point of use in C++.