One thing that really gets under my skin is the overuse of structs. I hear arguments such as "structs are simple", "I don't have to instantiate it", or my personal favorite, "this is just a record." A struct can be complex, not instantiating something is not a good excuse, and structs are not "records" (usually this comes from Delphi programmers).
A struct should represent a single value. If it doesn't represent a single value, it shouldn't be a struct. That's the general guideline I follow when dec...
2 comments posted.
#1
https://me.yahoo.com/mosessaur#7fe0d
282 days, 15 hours, 27 minutes ago said:
I didn't go through the content yet, but stopping using structs, NO WAY. There are situations where structs are exactly the right solution.
#2
KodefuGuru
282 days, 14 hours, 33 minutes ago said:
I do agree (and so does my article). The right situation for using a struct is to represent a single value. An entity should be a class.