logoalt Hacker News

alfiedotwtftoday at 5:25 PM0 repliesview on HN

> Today I think the missing piece is fields in traits: a way for a vtable to store field offsets rather than just pointers to method; current practice is to add getters and setters to traits when needed (but that's "ugly")

I've been wanting for a long time to re-implement Perl's Moo/Moose/Dios in Rust via macros. I think that would make for some really nice (but non-rust -looking) ways of doing all sorts of object hierarchy stuff