Don wrote:
> ...
> 
> On second thoughts, y = x.toLong or y = to!(long)(x) is probably better.
> Casts are evil, implicit casts even more so.

If you add a toLong or to_long member to BigInt, then to!(long)(x) will
work automatically.  Something similar applies to fromLong/from_long and
to!(BigInt)(cast(long)y).

Reply via email to