Go Programming talk [OT]

Jesse Phillips jessekphillips+D at gmail.com
Mon Jun 7 17:44:17 PDT 2010


On Sun, 06 Jun 2010 18:13:36 -0400, bearophile wrote:

> At 9.30 you can see the switch used on a type type :-) You can see a
> similar example here:
> http://golang.org/src/pkg/exp/datafmt/datafmt.go Look for the line
> switch t := fexpr.(type) {
> 
> ...
>
> Bye,
> bearophile

That isn't a type type. Untested D code

void fun(T, U)(T op, U y) {

    switch(typeof(y)) {
         case "immutable(char)[]":
         case "int":
    }
}


More information about the Digitalmars-d mailing list