Am 15.03.2011 22:46, schrieb Jens: > Jonathan M Davis wrote: >> On Tuesday, March 15, 2011 14:15:48 Max Samukha wrote: >>> >>> Class objects are possible on stack in D. >> >> Yes, but only with the help of the standard library: >> std.typecons.scoped. scoped classes are going to be removed from the >> language. It really shouldn't normally be the case that a class >> object is put on the case. >> > > And the language-idiomatic things are the ones to focus on rather than > "it can be done". > >
Right. And D is not C++ so you shouldn't try to do everything exactly like in C++, D has its own idioms. As said before: You can do almost everything in D that you can do in C++ (except for multiple inheritance, but you can kind-of do that with alias this), but it often is preferred to do stuff differently.