3 ms·
Java isn't mainstream? Granted, Java has 'references' instead of pointers, but they're close enough that the concept of boxing is basically the same.
by Quekid5 3y ago
Java isn't mainstream?
Granted, Java has 'references' instead of pointers, but they're close enough that the concept of boxing is basically the same.
- zaphirplane 3y agoAnd rust has the terminology https://doc.rust-lang.org/std/boxed/struct.Box.html https://doc.rust-lang.org/std/boxed/struct.Box.html
- lelanthran 3y agoI was referring to the term "Boxing", not the concept. No mainstream language that I am aware of uses the term "Box", while they almost all have something similar in concept, if not identical.
- virtue3 3y agoI think Java, Haskell and C# are the main languages where you have both boxed and unboxed values (C++ if you start doing smart pointer stuff I suppose, tho "String" could be considered a very fancy boxed char*). Python, Ruby, and JavaScript all have exclusively boxed values. "Everything is an object". I'm not sure what languages you use but that pretty dramatically covers most of the mainstream (top 10 at least).
- Quekid5 3y agoThe term Boxing is used in Java. (JVM languages really.)
- pjmlp 3y agoBoxing is common term in Java and .NET worlds.