Re: Is "delete" really going away?

2012-07-29 Thread bearophile
Minas Mina: Is this is true, why wasn't "delete" changed to behave like destroy()? Maybe to not silently break D code that uses delete, and allow easier future changes in the library/runtime code that implements destroy(). Bye, bearophile

Re: Is "delete" really going away?

2012-07-29 Thread Minas Mina
Thanks for the answers. So clear() or destroy() in 2.060 be used to call the destructor, but the actual memory of the object won't be freed, right? Is this is true, why wasn't "delete" changed to behave like destroy()?

Re: Is "delete" really going away?

2012-07-29 Thread Simen Kjaeraas
On Sun, 29 Jul 2012 15:03:09 +0200, Minas Mina wrote: Having a destructor and that you know when is going to be called is VERY useful! So by removing the "delete" keyword, what happens? We won't have a way to destroy objects in a predictable way anymore? (I'm not talking about structs in

Re: Is "delete" really going away?

2012-07-29 Thread Timon Gehr
On 07/29/2012 03:03 PM, Minas Mina wrote: Having a destructor and that you know when is going to be called is VERY useful! So by removing the "delete" keyword, what happens? We won't have a way to destroy objects in a predictable way anymore? (I'm not talking about structs in any way). Thanks

Is "delete" really going away?

2012-07-29 Thread Minas Mina
I think having the delete keyword for classes was a very good thing, altough I don't know the problems it has for the GC and probably other things. Consider this scenario: class Base { // ... } class Derived : Base { // ... FILE *f; this()