Fixing D's Properties

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Mon Aug 20 02:01:53 PDT 2007


Chad J wrote:
> BCS wrote:
> 
>>
>>>
>>> * 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>)
>>
>>
> 
> Pretty clever!  Too bad it seems very hardware dependent.

It would also be hell to implement on x86 and similar architectures. Too 
many instructions that access memory, all needing to be emulated...



More information about the Digitalmars-d mailing list