ref parameters: there is no escape

Mehrdad wfunction at hotmail.com
Tue Aug 16 19:35:05 PDT 2011


On 8/16/2011 8:08 AM, Timon Gehr wrote:
> Andrei proposed to make this invalid even for system functions. The 
> only way to escape a ref param's address would be
>
> @system void dangerous(ref int x) {
>     bar(cast(int*)&x);
> }
What type would it be casting /from/?

> So if you are supposing I think the C language is well designed and 
> warnings are useless for C, you are on the wrong path.
Right. Would you mind giving me around ~3 examples of languages you DO 
consider to be well-designed, other than D? Maybe we can (hopefully) 
find some common ground then...


More information about the Digitalmars-d mailing list