Is there a keyword to access the base class

Jacob Carlborg doob at me.com
Wed Jun 19 02:06:50 PDT 2013


On 2013-06-19 00:54, Steven Schveighoffer wrote:

> Hm... would be a nice idiom to implement generically in D. Like a type
> switch.

Pattern matching :)

You could quite easily implement something like this in library code:

match(b,
     (Foo f) => ,// use f
     (Foos fs) => // use fs
);

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list