property syntax strawman

Don nospam at nospam.com
Mon Aug 3 01:45:14 PDT 2009


grauzone wrote:
> Frank Benoit wrote:
>> KennyTM~ schrieb:
>>> Frank Benoit wrote:
>>>> Or how about making it a single method?
>>>>
>>>> bool empty=(bool* value){
>>>>     if( value ) _empty = *value;
>>>>     return _empty;
>>>> }
>>>>
>>>> The compiler rewrites the calling code to either pass the address or
>>>> null.
>>> So properties can't be used in SafeD?
>>
>> Hm, right pointers are not allowed there. So the "in" operator for AAs
>> is also disallowed? That surprises me.
> 
> You could allow pointers in SafeD. You just can't allow pointer 
> arithmetic, unless a pointer carries information on the upper and lower 
> bounds of the memory block.
> 
> By the way, the -safe in dmd2 switch doesn't seem to do anything yet 

Almost nothing. It disallows inline asm.

and
> allows unsafe pointer operations.



More information about the Digitalmars-d mailing list