|
|
|
|
|
by cityhomesteader
2927 days ago
|
|
> Then there is no boxing/unboxing of simple types or literals because they are one-and-the-same, and no there’s no confusion about how to interact with any truly generic type of value. It's simply performance/space. It's why value types still exist in Java, C#, etc. > A type hierarchy, patterned similar to Ruby’s as an example, makes the most sense: The type hierarchy doesn't matter. That's what C# does. It has one unified type system where even int, double, etc all ultimately derived from Object and it still have value types. It's a language/compiler design issue. > Then there is no boxing/unboxing of simple types or literals because they are one-and-the-same, and no there’s no confusion about how to interact with any truly generic type of value. In ruby there is no unboxing, but you could argue that all simple types are "lightly boxed" because they are objects by default. |
|