Hacker News new | past | comments | ask | show | jobs | submit login

Rust is great, but it can't do very basic things that OOP offer. You can't make a simple observer in Rust without RC<RefCell<T>>, unsafe, global-ish mutable state, or being forced into some framework.



You can always copy the observer into the observed structure (and avoid a lot of complications - observers are best created with FP, not OOP). You can also carry the GUI and whatever else you want as a parameter when executing the observer.

But, of course you won't be able to mutate arbitrary global state.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: