# Traits for Static Dispatch

**URL:** <https://ziggit.dev/t/traits-for-static-dispatch/10819>\
**Category:** Brainstorming\
**Created:** [July 5, 2025, 11:02pm UTC](https://ziggit.dev/t/traits-for-static-dispatch/10819 "2025-07-05T23:02:25Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ericlang](https://ziggit.dev/user_avatar/ziggit.dev/ericlang/32/8515_2.png) [@ericlang](https://ziggit.dev/u/ericlang)\
**Post date:** [July 6, 2025, 12:03pm UTC](https://ziggit.dev/t/traits-for-static-dispatch/10819/5 "2025-07-06T12:03:18Z")

</div>

While agreeing something maybe should change regarding anytype / interfaces, I also think flexibility should be preserved. Currently we can literally just put anything in an anytype and the compiler figures it out.  
What if anytype should be a `u8` or `u16`? Should we have a trait for that?

I think it is a very very difficult problem. Before we know we would get into Rust-like unreadable stuff. I cannot visualize any good + simple + readable syntactical solution better than the current one with anytype.

---

_[View the full topic](https://ziggit.dev/t/traits-for-static-dispatch/10819)._
