DIP66 - Multiple alias this
mw
mingwu at gmail.com
Mon Sep 28 20:45:33 UTC 2020
On Monday, 28 September 2020 at 20:28:17 UTC, mw wrote:
> On Monday, 28 September 2020 at 19:41:07 UTC, H. S. Teoh wrote:
>> I can see some situations for which you want two distinct
>> instances of A.x (there should be two distinct resources
>> acquired by D), and some other situations for which you want
>> them to be the same (the same resource should be shared by B
>> and C). How does Eiffel cater to both cases?
I didn't handle just 2 cases, but all kinds of cases, whether in
the Derived class D.x. you want *any* or even *none* of A.x, B.x,
C.x, all kinds of combination, the programmer can specify exactly
what s/he wanted using
-- undefine
-- redefine
-- rename
-- select
I showed 5 examples in Eiffel way, you can do it as an exercise
of all the other combinations.
More information about the Digitalmars-d
mailing list