News Score: Score the News, Sort the News, Rewrite the Headlines

Behavior inheritance in Rust

There is a common adage in Rust community that “Rust prefers composition over inheritance”. There is no inheritance support in common OO sense in Rust. You can achieve some OOP paradigms like, defining interface, using traits but not all. Lack of behavior inheritance became obvious, when I started to think about building a GUI toolkit in Rust. I am familiar with GTK+ and Qt which use a model, where all GUI elements are composed in a tree consisting of objects sharing common “is-a” Widget interfa...

Read more at abadcafe.wordpress.com

© News Score  score the news, sort the news, rewrite the headlines