I’ve just been laughing to myself how odd coders must sound when discussing technical stuff.
My wife just read an answer to a question in the ABAP Objects course and gave me the most confused of looks.
Here’s what she read…
Hi Peter (and class),
On the right hand side of the first slide of lecture 56, it shows intf_3 including both intf_1 and intf_2.
However, intf_2 already includes intf_1.
So, it seems to me that including intf_1 directly(?) in intf_3 is unnecessary.
Also, on the second slide of lecture 56, the examples there seem to support my suspicion that it was unnecessary to include intf_1 in intf_3 on the first slide–that is, intf_1 would have already been included in intf_3, by virtue of intf_1 being included in inft_2, and then intf_2 being included in intf_3.
Is my understanding of this correct? If so, is there any benefit or drawback to directly (explicitly?) including intf_1 in intf_3 in the example on the right hand side of the first slide?
(It was a bit confusing–as is evident by my question–to see this interface nesting apparently being done one way on the first slide and then a different way on the second slide, without comment or explanation of the difference. So, I am looking for a bit more information on that, to help my understanding.)
Here is my response…
You have understood this correctly. Including intf_1 is unnecessary. It was included to show you can specify it this way (if you wish) but also that it does not build a hierarchy.
It does get a little confusing I admit. You will probably never come across code like in slide 1, but it is important to understand what is possible and that when a component interface (intf_a) is included in another component interface (intf_b) that included in a compound interface (intf_c), the resulting components of intf_c are:intf_c~intf_a intf_c~intf_b
I hope that makes sense!
After the confused look my wife said … What the hell is an interface?