Matthias Walter <xa...@xammy.homelinux.net> wrote:

On 11/21/2010 04:33 PM, Don wrote:
Matthias Walter wrote:
as it seems, the current version of BigInt is not capable of const, i.e.
BigInt(1) + const(BigInt)(1) does not work.

Is there already an effort to fix this or would it make sense if I had
taken some time to create a fix for it? I have no idea of all the asm in
the x86 specialization but as const is an interface thing, I should be
able to figure out everything without that knowledge. Or are there
general design problems, such that this would be a waste of time?

It's been prevented by some compiler bugs. The changes to pure in
2.050 were triggered by attempts to make BigInt pure. 2.051 will
include several fixes to nothrow.
You mean by "making BigInt pure" that all the computation-methods (like
opBinary, etc.) will be pure, right? Or can D structs be pure as well?
(Whatever this would mean...)

"Making BigInt pure" means making it usable in pure functions. That is,
make all member functions pure that can be pure.



--
Simen

Reply via email to