#inheritance chaining

1 messages · Page 1 of 1 (latest)

onyx heart
#

Generally, I've seen that people recommend inheritance to be shallow, but just curious, in a professional setting does it tend to get deep/complex?

hazy thicketBOT
#

When your question is answered use !solved or the button below to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

chilly bridge
onyx heart
#

Gotcha. Composition as in composition and aggregation right

chilly bridge
onyx heart
#

Okay I see

#

Just making sure I understand them correctly.
Composition is where a class has another class and owns it
Aggregation is where a class has another class but doesn’t own it(holds a pointer)

Would you say aggregation is less common? Or just depends on the context

chilly bridge
onyx heart
#

Sounds good!

fallen spindle
onyx heart
#

😭sounds like a headache lol

fallen spindle
# onyx heart 😭sounds like a headache lol

nah it's ez
forcefully insert a compile error like, rename some class from
ValueBase to ValueBaseFake

and watch as the compielr spits out all occurences of ValueBase saying "ValueBase not found, did you mean ValueBaseFake?"

onyx heart
#

Welp

#

😓