On 21.03.2012 18:14, Walter Bright wrote:
On 3/21/2012 8:21 AM, Don Clugston wrote:
On 21/03/12 03:47, Walter Bright wrote:
And now x is an instance of a voldemort type! It's completely
encapsulated.

That idiom is already built into the language. Anonymous nested
classes don't
have a name at all.

auto x = new class { ... }


True, but it's the ability to return them from a function that's new &
cool!

(Yes, I know you can return x as type "Object".)

BTW what is 'nested' about anonymous nested classes? They seem to work anywhere! Can we just drop that from the name?

Reply via email to