# \[Pitch\] Object Wrappers

**URL:** <https://forums.swift.org/t/pitch-object-wrappers/81812>\
**Category:** Pitches\
**Created:** [August 26, 2025, 9:11am UTC](https://forums.swift.org/t/pitch-object-wrappers/81812 "2025-08-26T09:11:47Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Dmitriy\_Ignatyev](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dmitriy_ignatyev/32/11340_2.png) [@Dmitriy\_Ignatyev](https://forums.swift.org/u/Dmitriy_Ignatyev)\
**Post date:** [August 27, 2025, 12:38pm UTC](https://forums.swift.org/t/pitch-object-wrappers/81812/5 "2025-08-27T12:38:50Z")

</div>

> [@atifdev10](#):
>
> It can also be directly input to functions without calling `.element` as long as the element matches the value’s type.

`ObjectWrapper` has no way to conform to SDK private / internal protocols and therefore such design can easily cause unexpected behavior, because wrapper casting to private protocols fails.

There are also newtypes topics previously discussed. This is a more common feature for addressing these needs:

> [@Newtype for Swift](https://forums.swift.org/t/newtype-for-swift/35859):
>
> newtype has [come up again](https://forums.swift.org/t/newtype-without-automatic-protocol-forwarding/16110/31) and since I don't have a specific pitch I thought I'd start some discussion outside of the older thread. Before diving into specific syntax or implementation details I think it would be good to gather ideas about what people want out of such a feature and what they feel is most important. Personally, I'm a fan of starting with simpler newtype behavior: newtypes inherit all of the functionality and conformances of the original type, but are considered separate types. De…

> [@Newtype without automatic protocol forwarding](https://forums.swift.org/t/newtype-without-automatic-protocol-forwarding/16110/9):
>
> The OP did state it would be 'semantically' similar to a struct with a value, but it doesn't have to be exactly equivalent to that. I'm no expert, but perhaps it would be possible for the compiler to fudge the access level so that we could have the RawRepresentable conformance while still hiding the internally stored value? Of course, part of the pitch does state Int is not a RecordId and having RawRepresentable with the copied type would break that wouldn't it? It also may be against the goa…

---

_[View the full topic](https://forums.swift.org/t/pitch-object-wrappers/81812)._
