Usage preference between a struct and a class in D language
Reason #1 to choose struct vs class: classes have inheritance, structs do not. If you need polymorphism, you must use classes. Reason #2: structs are normally value types (though you can make them reference types if you work at it). Classes are always reference types. So, if you want a value type, choose a struct. … Read more