Smithay / smithay

A smithy for rusty wayland compositors
MIT License
1.83k stars 156 forks source link

Reduce usage of typemaps #378

Open DemiMarie opened 3 years ago

DemiMarie commented 3 years ago

When working with Smithay, the biggest pain point has invariably been the extremely heavy use of typemaps. If I pass the wrong type, I will get None with no explanation whatsoever, which is not something I expect when using Rust.

One alternative would be to make the entire crate generic over a Compositor trait that represented the compositor.

i509VCB commented 2 years ago

Any onlookers, see https://github.com/Smithay/wayland-rs/pull/381 for the possible changes that would lead to removal of the type maps.