D - more or less power than C++?

Georg Wrede georg.wrede at nospam.org
Sat Mar 4 04:49:26 PST 2006



Andrew Fedoniouk wrote:
>
> It is not like in JavaScript where function frames are
> valid if referenced somewhere.
> 
> Following:
> 
> var tt;
> function test()
> {
>   var s0 = "Hello";
>   function testtest()
>   {
>     stdout << s0;
>   }
>   tt = testtest;
> }
> 
> test();
> tt();
> 
> stdout << " World!";
> 
> will print in JS (my TIScript here) :
> 
>>Hello World!
> 
> D will GPF on something like this I guess.

In my book, this is a Feature of D.



More information about the Digitalmars-d mailing list