Getting member by name in runtime

Adam D. Ruppe destructionator at gmail.com
Wed Aug 21 05:08:45 PDT 2013


On Wednesday, 21 August 2013 at 12:03:38 UTC, Jacob Carlborg 
wrote:
> Unless you build a set or associative array at compile time 
> with all the members of a given type.

Or build a string with a switch() { case "member1": member1(); 
break; case "mem2": mem2(); }

then mix that in and hope the compiler optimizes the switch.


More information about the Digitalmars-d-learn mailing list