dynamic classes and duck typing

retard re at tard.com.invalid
Wed Dec 2 04:25:42 PST 2009


Wed, 02 Dec 2009 13:12:58 +0100, Lars T. Kyllingstad wrote:

> std.conv.to() to the rescue! :)
> 
>    import std.conv;
>    ...
> 
>    row[] a = sql_engine.execute("select * from foobar;").result;
> 
>    int b = to!int(a[0][0]);          // Throws if conversions fail
>    string c = to!string(a[0][1]);
> 
> -Lars

You also seem to miss the point. The topic of this conversation (I 
think?) was about static verification. to! throws at runtime.



More information about the Digitalmars-d mailing list