this post was submitted on 03 Jul 2023
6 points (100.0% liked)

Programming

355 readers
1 users here now

This magazine is dedicated to discussions on programming languages, software development, and coding. Whether you are a beginner programmer or an experienced developer, this is the place for you. Here you can share your knowledge, ask questions, and engage in discussions on topics such as coding languages, software engineering, web development, and more. From the latest trends and frameworks to tips and tricks for debugging, this category covers a wide range of topics related to programming.

founded 2 years ago
 

Languages on the rise like Rust and Go are being quite vocal against inheritance and many engineers seem to agree. Why? And is it the fall of inheritance?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago

I liked the idea of inheritance when you need to define a single thing and spawn it multiple times, but each class required exceptions, too many overrides to count, and usually I would spawn a thing either once or twice in my code, or 15000 times - neither scenario being optimal to having that many objects floating independently about. Sometimes an assoc. array is all you need.