Even though there is a warning for generic methods they do work in my experience. Otherwise you could do pointer proc interfaces where you abstract all procs into `proc(_: Widget, ....)` then inside do like proc label(str: string): Widget = Label( str: str, drawProc: (proc(widg: Widget, ...) = let widg = Label(widg)) ) .... Run
Though if you really want to go into the deep end you could do full static dispatch heavily using generics and concepts like I do with <https://github.com/beef331/gooey/>