api-guidelines icon indicating copy to clipboard operation
api-guidelines copied to clipboard

Update sealed traits pattern

Open jhpratt opened this issue 3 years ago • 0 comments

There's no need to have a doc-hidden method to simulate private trait items. They can be placed in the supertrait that performs the sealing. The advantage here is that the compiler enforces that it's not used downstream. I personally use this pattern in a few places.

jhpratt avatar Sep 07 '22 07:09 jhpratt