# Improve opaque types

**URL:** <https://contributors.scala-lang.org/t/improve-opaque-types/4786>\
**Category:** Language Design\
**Created:** [January 5, 2021, 12:59pm UTC](https://contributors.scala-lang.org/t/improve-opaque-types/4786 "2021-01-05T12:59:16Z")\
**Posts on this page:** 1\
**Showing post:** 43

<div class="post-metadata">

**Author:** ![SethTisue](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/sethtisue/32/3185_2.png) [@SethTisue](https://contributors.scala-lang.org/u/SethTisue)\
**Post date:** [January 11, 2021, 4:42am UTC](https://contributors.scala-lang.org/t/improve-opaque-types/4786/43 "2021-01-11T04:42:54Z")

</div>

> [@LPTK](#):
>
> In Scala 2, the following code will not box any of the integers, AFAIK (someone correct me if I’m wrong):

You’re not wrong. If you `javap -c` it you’ll see that Scala 2 uses `Tuple2$mcII$sp` (specialized) throughout, rather than an ordinary `Tuple2`, to avoid boxing the `Int`s. Whereas Scala 3 boxes them.

---

_[View the full topic](https://contributors.scala-lang.org/t/improve-opaque-types/4786)._
