Dmitry Potapov <dpotapov@xxxxxxxxxx> writes: > On Sun, Sep 23, 2007 at 09:54:10AM -0700, Linus Torvalds wrote: > >> - the stuff C++ *does* have is usually nasty. Implicit >> initializers and destructors and the magic lifetime rules of >> objects etc > > I am not sure what is wrong with initializers and destructors in > C++, but certainly there is no magic lifetime rules in C++, as it is > fully determined by the scope. It has been some time since I last looked, but the lifetime of objects constructed in return statements was a moving target through several standards. The last standard I bothered looking at had the object survive until the statement with the function call expression ended: quite a strange synchronization point with regard to language design. > In fact, other high level languages that use GC have much more > unpredictable lifetime rules for objects. Mostly objects are alive as long as you can refer to them. Not really complicated. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html