Get the latest tech news

Rust is beyond object-oriented, part 3: Inheritance (2023)


In this next1 post of my series explaining how Rust is better off without Object-Oriented Programming, I discuss the last and (in my opinion) the weirdest of OOP’s 3 traditional pillars. It’s not encapsulation, a great idea which exists in some form in every modern programming language, just OOP does it oddly. It’s not polymorphism, also a great idea that OOP puts too many restrictions on, and that Rust borrows a better design for from Haskell (with syntax from C++).

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Rust

Rust

Photo of inheritance

inheritance

Photo of Object

Object

Related news:

News photo

Brave refurbishes Rust adblocking engine for reduced memory footprint

News photo

GStreamer 1.28-RC1 Brings A Rust-Based GIF Decoder, Other New Rust Components

News photo

Rust-Based Fjall 3.0 Released For Key-Value Storage Engine Akin To RocksDB