# Adding a static / comptime Optional to the stdlib

**URL:** <https://forum.modular.com/t/adding-a-static-comptime-optional-to-the-stdlib/1414>\
**Category:** Language Design\
**Tags:** discussion\
**Created:** [May 9, 2025, 1:18pm UTC](https://forum.modular.com/t/adding-a-static-comptime-optional-to-the-stdlib/1414 "2025-05-09T13:18:25Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![samufi](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@samufi](https://forum.modular.com/u/samufi)\
**Post date:** [May 16, 2025, 3:23pm UTC](https://forum.modular.com/t/adding-a-static-comptime-optional-to-the-stdlib/1414/6 "2025-05-16T15:23:31Z")

</div>

I think this would be a different proposal (though it would likely go in the direction of what @Nick had in mind). The thing that `ComptimeOptional` is supposed to solve is _not_ that different types can be assumed but that an attribute is present or not based on a parameter. Such a thing as the “parametric var” sought for in a [different post](https://forum.modular.com/t/parametric-var/1378/3).

---

_[View the full topic](https://forum.modular.com/t/adding-a-static-comptime-optional-to-the-stdlib/1414)._
