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

Programming

4 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 1 year 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
[–] tetris11@kbin.social 2 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.