Three Unlikely Successful Features of D

Walter Bright newshound2 at digitalmars.com
Wed Mar 21 10:14:48 PDT 2012


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".)


More information about the Digitalmars-d mailing list