Fixing D's Properties

BCS ao at pathlink.com
Sun Aug 19 13:27:11 PDT 2007


Reply to Chad,

> I like where all of this is going.
> 
> Then the solution becomes one which allows properties to be treated
> exactly* as members on the using side, yet allows the underlying
> functions to be used as well.  So BCS, would you be willing to settle
> for such a solution?

Let's say I wouldn't object to it. (I'm still not totally convinced something 
/needs/ to be done, but I do thing that it's worth looking at)

> 
> * I realize we may have to settle for properties being "close enough"
> to members, due to addressing.
>

You actually could make pointers to properties work just like members by 
placing the address of the member in invalid memory locations. Then on a 
seg-v, check if the address is attached to a property and stuff in the right 
value. I heard that at one point some computer systems used a something like 
that (but using illegal op codes) to fake having a floating point unit.

(BTW, I am NOT suggesting this be used <G>)





More information about the Digitalmars-d mailing list