# Default-initable Protocol

**URL:** <https://forums.swift.org/t/default-initable-protocol/53723>\
**Category:** Pitches\
**Created:** [November 26, 2021, 11:20am UTC](https://forums.swift.org/t/default-initable-protocol/53723 "2021-11-26T11:20:54Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![xwu](https://avatars.discourse-cdn.com/v4/letter/x/b487fb/32.png) [@xwu](https://forums.swift.org/u/xwu)\
**Post date:** [November 26, 2021, 3:27pm UTC](https://forums.swift.org/t/default-initable-protocol/53723/4 "2021-11-26T15:27:12Z")

</div>

> [@\[Pitch\] Add the DefaultConstructible protocol to the standard library](https://forums.swift.org/t/pitch-add-the-defaultconstructible-protocol-to-the-standard-library/4771):
>
> This protocol is present in C++ [http://en.cppreference.com/w/cpp/concept/DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible) as well as in Rust [std::default - Rust](https://doc.rust-lang.org/std/default/) It's the identity element/unit of a monoid or a zero. The Swift implementation is very simple (I'm open to different names) protocol DefaultConstructible { &nbsp;&nbsp;&nbsp;&nbsp;init() } A lot of the standard types could then be made to conform to this protocol. These include all the numeric types, collection types (array, set, dict), string, basically at least every type …

---

_[View the full topic](https://forums.swift.org/t/default-initable-protocol/53723)._
